chore(deps): update percona/mongodb_exporter digest to 95d1865 #1191
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### On Pr creation against main | |
### | |
### checking_pr | |
### +-----------------------+ | |
### | | | |
### | Runs sanity checks | | |
### | | | |
### | Tests Packages linux | | |
### | if enabled | | |
### | | | |
### +-----------------------+ | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: | |
- renovate/** | |
env: | |
GPG_MAIL: '[email protected]' | |
OHAI_PFX_CERTIFICATE_BASE64: ${{ secrets.OHAI_PFX_CERTIFICATE_BASE64 }} # base64 encoded | |
OHAI_PFX_PASSPHRASE: ${{ secrets.OHAI_PFX_PASSPHRASE }} | |
GORELEASER_VERSION: 'v1.13.1' | |
### | |
### Checking PR # Checks the file and the info provided when an exporter is modified | |
### | |
name: Checking PR | |
jobs: | |
check_exporter_preconditions: | |
name: Test exporter e2e and output exporter variables | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: nri-config-generator/go.mod | |
- name: Check if exporters have been modified | |
id: check | |
# Running shouldDoRelease we check if any exporter.yml has been modified, if so we set CREATE_RELEASE to true setting the variable EXPORTER_PATH | |
# That variable is used by the following step and jobs | |
run : | | |
source ./scripts/common_functions.sh | |
shouldDoRelease | |
loadVariables $EXPORTER_PATH | |
setStepOutput | |
outputs: | |
CREATE_RELEASE: ${{ steps.check.outputs.CREATE_RELEASE }} | |
EXPORTER_PATH: ${{ steps.check.outputs.EXPORTER_PATH }} | |
PACKAGE_LINUX: ${{ steps.check.outputs.PACKAGE_LINUX }} | |
PACKAGE_WINDOWS: ${{ steps.check.outputs.PACKAGE_WINDOWS }} | |
INTEGRATION_NAME: ${{ steps.check.outputs.NAME }} | |
INTEGRATION_VERSION: ${{ steps.check.outputs.VERSION }} | |
RELEASE_TAG: ${{ steps.check.outputs.PACKAGE_NAME }}-${{ steps.check.outputs.VERSION }} | |
EXPORTER_REPO_URL: ${{ steps.check.outputs.EXPORTER_REPO_URL }} | |
EXPORTER_HEAD: ${{ steps.check.outputs.EXPORTER_HEAD }} | |
EXPORTER_CHANGELOG: ${{ steps.check.outputs.EXPORTER_CHANGELOG }} | |
checking_pr: | |
name: Checking PR | |
runs-on: ubuntu-latest | |
needs: [check_exporter_preconditions] | |
if: ${{ needs.check_exporter_preconditions.outputs.CREATE_RELEASE == 'true' && needs.check_exporter_preconditions.outputs.PACKAGE_LINUX == 'true'}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: nri-config-generator/go.mod | |
- name: Install goreleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: ${{ env.GORELEASER_VERSION }} | |
install-only: true | |
- name: Compile exporter | |
run : | | |
make build-${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }} | |
- name: e2e-test | |
uses: newrelic/newrelic-integration-e2e-action@v1 | |
with: | |
spec_path: exporters/${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }}/e2e/e2e_spec.yml | |
account_id: ${{ secrets.COREINT_E2E_ACCOUNT_ID }} | |
api_key: ${{ secrets.COREINT_E2E_API_KEY }} | |
license_key: ${{ secrets.COREINT_E2E_LICENSE_KEY }} | |
build_linux_artifacts: | |
name: Build Linux artifacts and packages | |
runs-on: ubuntu-latest | |
needs: [check_exporter_preconditions] | |
if: ${{ needs.check_exporter_preconditions.outputs.CREATE_RELEASE == 'true' && needs.check_exporter_preconditions.outputs.PACKAGE_LINUX == 'true'}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: nri-config-generator/go.mod | |
- name: Install goreleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: ${{ env.GORELEASER_VERSION }} | |
install-only: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get install rpm ruby ruby-dev rubygems build-essential rpm gnupg2 gpg-agent debsigs | |
sudo gem install --no-document fpm | |
- name: Package linux | |
id: package | |
env: | |
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }} | |
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | |
run : | | |
make package-${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }} | |
- name: Test package installability | |
uses: newrelic/integrations-pkg-test-action/linux@v1 | |
with: | |
tag: ${{ needs.check_exporter_preconditions.outputs.INTEGRATION_VERSION }} | |
integration: nri-${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }} | |
upgrade: false | |
pkgDir: ./exporters/${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }}/target/packages/ | |
build_windows_artifacts: | |
name: Build Windows artifacts and packages | |
runs-on: windows-latest | |
needs: [check_exporter_preconditions] | |
if: ${{ needs.check_exporter_preconditions.outputs.CREATE_RELEASE == 'true' && needs.check_exporter_preconditions.outputs.PACKAGE_WINDOWS == 'true' }} | |
env: | |
GOPATH: ${{ github.workspace }} | |
GOOS: windows | |
defaults: | |
run: | |
working-directory: src/repo | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: src/repo | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: src/repo/nri-config-generator/go.mod | |
- name: Install goreleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: ${{ env.GORELEASER_VERSION }} | |
install-only: true | |
- name: Install dependencies | |
shell: bash | |
run: | | |
choco install yq | |
- name: Get PFX certificate from GH secrets | |
shell: bash | |
run: printf "%s" "$OHAI_PFX_CERTIFICATE_BASE64" | base64 -d - > mycert.pfx | |
- name: Build windows binary | |
id: package | |
shell: bash | |
run : | | |
make package-${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }} | |
- name: Test win packages installation | |
uses: newrelic/integrations-pkg-test-action/windows@v1 | |
with: | |
tag: ${{ needs.check_exporter_preconditions.outputs.INTEGRATION_VERSION }} | |
integration: nri-${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }} | |
arch: amd64 | |
pkgDir: ${{ github.workspace }}\src\repo\exporters\${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }}\target\packages | |
pkgName: nri-${{ needs.check_exporter_preconditions.outputs.INTEGRATION_NAME }}-amd64.${{ needs.check_exporter_preconditions.outputs.INTEGRATION_VERSION }}.msi | |
upgrade: false |