0.32.0 #145
Workflow file for this run
This file contains hidden or 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
| #permissions: | |
| # contents: read | |
| on: | |
| release: | |
| types: | |
| - prereleased | |
| env: | |
| # Allows to fetch multiple private repo crates with different deploy keys. | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| # See https://docs.github.com/en/actions/using-jobs/using-concurrency | |
| name: pre-release | |
| jobs: | |
| build-packages: | |
| name: Build packages | |
| uses: ./.github/workflows/component_packages.yml | |
| with: | |
| pre-release: true | |
| tag_name: ${{ github.event.release.tag_name }} | |
| secrets: inherit | |
| build-image: | |
| name: Build and Push container image | |
| uses: ./.github/workflows/component_image.yml | |
| with: | |
| image-tag: ${{ github.event.release.tag_name }}-rc | |
| push: true | |
| secrets: inherit | |
| security-scan: | |
| name: Security scan | |
| needs: [ build-image ] | |
| uses: ./.github/workflows/component_image_security.yml | |
| with: | |
| image-tag: ${{ github.event.release.tag_name }}-rc | |
| secrets: inherit | |
| upload: | |
| runs-on: ubuntu-latest | |
| name: Upload to S3 | |
| needs: [ build-packages ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| #download release assets | |
| - name: Download release | |
| run: gh release download ${{ github.event.release.tag_name }} --dir ./dist/ | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish deb to S3 action | |
| uses: newrelic/infrastructure-publish-action@v1 | |
| with: | |
| tag: ${{ github.event.release.tag_name }} | |
| app_name: "newrelic-agent-control" | |
| repo_name: ${{ github.repository }} | |
| schema: "custom-local" | |
| schema_path: "/srv/build/upload-schema-linux-deb.yml" | |
| aws_access_key_id: ${{ secrets.TMP_OHAI_AWS_ACCESS_KEY_ID_STAGING }} | |
| aws_secret_access_key: ${{ secrets.TMP_OHAI_AWS_SECRET_ACCESS_KEY_STAGING }} | |
| aws_s3_bucket_name: "nr-downloads-ohai-staging" | |
| aws_s3_lock_bucket_name: "onhost-ci-lock-staging" | |
| access_point_host: "staging" | |
| run_id: ${{ github.run_id }} | |
| aws_region: "us-east-1" | |
| aws_role_session_name: ${{ secrets.TMP_OHAI_AWS_ROLE_SESSION_NAME_STAGING }} | |
| aws_role_arn: ${{ secrets.TMP_OHAI_AWS_ROLE_ARN_STAGING }} | |
| # used for signing package stuff | |
| gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }} | |
| gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | |
| disable_lock: false | |
| dest_prefix: "preview/" | |
| local_packages_path: "/srv/dist/" | |
| apt_skip_mirror: false | |
| - name: Publish rpm to S3 action | |
| uses: newrelic/infrastructure-publish-action@v1 | |
| with: | |
| tag: ${{ github.event.release.tag_name }} | |
| app_name: "newrelic-agent-control" | |
| repo_name: ${{ github.repository }} | |
| schema: "custom-local" | |
| schema_path: "/srv/build/upload-schema-linux-rpm.yml" | |
| aws_access_key_id: ${{ secrets.TMP_OHAI_AWS_ACCESS_KEY_ID_STAGING }} | |
| aws_secret_access_key: ${{ secrets.TMP_OHAI_AWS_SECRET_ACCESS_KEY_STAGING }} | |
| aws_s3_bucket_name: "nr-downloads-ohai-staging" | |
| aws_s3_lock_bucket_name: "onhost-ci-lock-staging" | |
| access_point_host: "staging" | |
| run_id: ${{ github.run_id }} | |
| aws_region: "us-east-1" | |
| aws_role_session_name: ${{ secrets.TMP_OHAI_AWS_ROLE_SESSION_NAME_STAGING }} | |
| aws_role_arn: ${{ secrets.TMP_OHAI_AWS_ROLE_ARN_STAGING }} | |
| # used for signing package stuff | |
| gpg_passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }} | |
| gpg_private_key_base64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | |
| disable_lock: false | |
| dest_prefix: "preview/" | |
| local_packages_path: "/srv/dist/" | |
| apt_skip_mirror: false | |
| onhost-e2e: | |
| uses: ./.github/workflows/component_onhost_e2e.yaml | |
| needs: [ upload ] | |
| with: | |
| PACKAGE_VERSION: ${{ github.event.inputs.tag || github.event.release.tag_name }} | |
| UNIQUE_NAME: "onhost:e2e:${{ github.event.inputs.tag || github.event.release.tag_name }}" | |
| # We use single quotes so the double-quotes are passed to the sed command in the make target (see the test/provision target) | |
| EC2_FILTERS: '[\"ubuntu\",\"centos7\",\"centos8\",\"centos-stream\",\"sles-15.3\",\"sles-15.4\",\"sles-15.5\",\"redhat\",\"debian-bullseye\",\"debian-bookworm\",\"al\"]' | |
| REPOSITORY_ENDPOINT: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/preview" | |
| secrets: | |
| AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} | |
| AWS_VPC_SUBNET: ${{ secrets.AWS_VPC_SUBNET }} | |
| molecule-packaging-tests: | |
| uses: ./.github/workflows/component_molecule_packaging.yml | |
| needs: [ upload ] | |
| with: | |
| TAG: ${{ github.event.inputs.tag || github.event.release.tag_name }} | |
| PACKAGE_NAME: "newrelic-agent-control" | |
| REPO_ENDPOINT: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/preview" | |
| # TODO this step has been failing and needs to be fixed https://new-relic.atlassian.net/jira/software/c/projects/NR/boards/61?selectedIssue=NR-351307 | |
| # canaries: | |
| # uses: ./.github/workflows/component_canaries.yml | |
| # needs: [ molecule-packaging-tests ] | |
| # with: | |
| # TAG: ${{ github.event.inputs.tag || github.event.release.tag_name }} | |
| # secrets: | |
| # AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} | |
| # AWS_VPC_SUBNET: ${{ secrets.AWS_VPC_SUBNET }} | |
| k8s_canaries: | |
| uses: ./.github/workflows/component_k8s_canaries.yml | |
| needs: [ build-image ] | |
| with: | |
| image-tag: ${{ github.event.release.tag_name }}-rc | |
| cluster_name: Agent_Control_Canaries_Production-Cluster | |
| secrets: | |
| AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} | |
| AWS_VPC_SUBNET: ${{ secrets.AWS_VPC_SUBNET }} | |
| get_previous_tag: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| previous_tag: ${{ steps.previous_tag_step.outputs.PREVIOUS_TAG }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: previous_tag_step | |
| run: ./.github/workflows/scripts/previous_version.sh ${{ inputs.TAG }} >> "$GITHUB_OUTPUT" | |
| # TODO The creation of the canaries is commented out right now | |
| # prune-previous-canaries: | |
| # needs: get_previous_tag | |
| # uses: ./.github/workflows/component_canaries_prune.yaml | |
| # with: | |
| # TAG: ${{ needs.get_previous_tag.outputs.previous_tag }} | |
| # secrets: | |
| # AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} | |
| # AWS_VPC_SUBNET: ${{ secrets.AWS_VPC_SUBNET }} |