An action to test for correct installation and upgrades of New Relic integration packages. It tests clean installation and upgrade for integration packages in Rocky Linux, Suse and Ubuntu, as well as in Windows.
Usage and defaults:
Test local packages produced in the dist
folder:
- name: Test packages installation
uses: newrelic/integrations-pkg-test-action/linux@v1
with:
tag: ${{ env.TAG }} # Required, trailing v is stripped automatically if found
integration: 'nri-${{ env.INTEGRATION }}' # Required, with nri- prefix
Test packages uploaded to the staging repos:
Note: When
packageLocation == repo
,tag
does not specify which version is downloaded from the repo (which by default is always the latest available). However,tag
will be used to compare against the-show_version
output and ensure the installed version is the desired one. The version to be downloaded can be specified with the parameterrepoVersion
.
- name: Test staging repo
uses: newrelic/integrations-pkg-test-action/linux@v1
with:
tag: ${{ env.TAG }}
integration: 'nri-${{ env.INTEGRATION }}' # Required, with nri- prefix
stagingRepo: true
packageLocation: repo
upgrade: false # Upgrade path test does not make sense when testing the repo
The following inputs can be specified to override the default behavior
repoVersion
: Version to be downloaded from the repo, by default will be the latest (v is stripped automatically if found). This parameter will be ignored if packageLocation islocal
.upgrade
: Whether to test upgrade path against the version of the same integration in the newrelic repo- default:
true
- default:
postInstallExtra
: Extra checks to run in addition to the default post-install script. This is specified as a multi-line shell script, which is run line-by-line in different containers. A non-zero exit code for any line causes the installation check to fail.- default: empty
postInstall
: Override the post-install test script. This is run line-by-line in different containers. A non-zero exit code causes the install check to fail.- default: See
entrypoint.sh
- default: See
distros
: Space-separated list of distros to run the test on. See below for details.packageLocation
: Whether to test local packages (local
) or packages from the upstream repo (repo
). Useful for testing the staging repo.- Note: Specifying both
packageLocation: repo
andupgrade: true
is not possible and such combination will be silently ignored. - default:
local
- Note: Specifying both
stagingRepo
: Pull repo packages from the staging repo rather than production. Useful for testing staging repo packages alone (rather than local).- default:
false
- default:
pkgDir
: Path where archives (.deb and .rpm) reside- default:
./dist
- default:
Distros to test on are supplied as docker tags, provided that a mapping between the tag and a helper script is available for it. Mapping between tags and helpers can be found here: https://github.com/newrelic/integrations-pkg-test-action/blob/master/linux/helper.sh#L8
If a mapping exists for the docker image, the associated helper script will be responsible of adding to the image the corresponding repository for that particular tag.
Despite not being docker tags, action.sh
will also accept the following values:
ubuntu
suse
rockylinux
debian
This action is mainly contained in one shell script (and a few dockerfiles) and can be run in systems which have a bash-compatible shell and docker installed.
Inputs are taken as environment vars, transforming camelCase
to UPPERCASE_WITH_UNDERSCORES
. Additionally, GITHUB_ACTION_PATH
must be specified if WD is not the linux/
directory.
Test local packages:
GITHUB_ACTION_PATH=./linux TAG=v1.3.0 INTEGRATION=nri-snmp ./linux/action.sh
Test staging repo packages:
STAGING_REPO=true PACKAGE_LOCATION=repo PKGDIR=testdata/dist GITHUB_ACTION_PATH=./linux TAG=v1.3.0 INTEGRATION=nri-snmp ./linux/action.sh
Usage and defaults:
- name: Test packages installation
uses: newrelic/integrations-pkg-test-action/windows@v1
with:
tag: ${{ env.TAG }} # Required, trailing v is stripped automatically if found
integration: 'nri-${{ env.INTEGRATION }}' # Required, with nri- prefix
arch: 'amd64' # Architecture to test [amd64, 386]
The following inputs can be specified to override the default behavior
upgrade
: Whether to test upgrade path against the version of the same integration in the newrelic repo- default:
true
- default:
pkgDir
: Path where archives (.msi) reside- default:
build\package\windows\nri-${ARCH}-installer\bin\Release
- default:
Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels.
New Relic offers NRDiag, a client-side diagnostic utility that automatically detects common problems with New Relic agents. If NRDiag detects a problem, it suggests troubleshooting steps. NRDiag can also automatically attach troubleshooting data to a New Relic Support ticket.
If the issue has been confirmed as a bug or is a Feature request, please file a Github issue.
Support Channels
- New Relic Documentation: Comprehensive guidance for using our platform
- New Relic Community: The best place to engage in troubleshooting questions
- New Relic Developer: Resources for building a custom observability applications
- New Relic University: A range of online training for New Relic users of every level
- New Relic Technical Support 24/7/365 ticketed support. Read more about our Technical Support Offerings.
We encourage your contributions to improve this action! Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.
If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at opensource@newrelic.com.
A note about vulnerabilities
As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.
If you would like to contribute to this project, review these guidelines.
To all contributors, we thank you! Without your contribution, this project would not be what it is today. We also host a community project page dedicated to Project Name.
integrations-pkg-test-action is licensed under the Apache 2.0 License.