Prerelease #109
Workflow file for this run
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
name: Prerelease | |
on: | |
release: | |
types: | |
- prereleased | |
tags: | |
- '*' | |
jobs: | |
prerelease: | |
name: Pre-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set and validate distribution name and version | |
run: .github/workflows/scripts/set_version.sh | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '~1.22.3' | |
check-latest: true | |
- name: Generate distribution sources | |
run: make generate-sources | |
- name: Log into Docker.io | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.OHAI_DOCKER_HUB_ID }} | |
password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }} | |
- name: Build binaries & packages with GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
distribution: goreleaser | |
version: '~> v1' | |
args: release --rm-dist --timeout 2h | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }} | |
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | |
GPG_MAIL: '[email protected]' | |
publishing-to-s3: | |
name: Publish artifacts into s3 staging bucket | |
uses: ./.github/workflows/component_publish.yml | |
needs: [prerelease] | |
secrets: | |
DOCKER_HUB_ID: ${{ secrets.OHAI_DOCKER_HUB_ID }} | |
DOCKER_HUB_PASSWORD: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }} | |
GPG_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }} | |
GPG_PRIVATE_KEY_BASE64: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }} # base64 encoded | |
AWS_ACCESS_KEY_ID: ${{ secrets.OHAI_AWS_ACCESS_KEY_ID_STAGING }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.OHAI_AWS_SECRET_ACCESS_KEY_STAGING }} | |
AWS_ROLE_ARN: ${{ secrets.OHAI_AWS_ROLE_ARN_STAGING }} | |
AWS_ROLE_SESSION_NAME: ${{ secrets.OHAI_AWS_ROLE_SESSION_NAME_STAGING }} | |
with: | |
ACCESS_POINT_HOST: "staging" | |
SCHEMA_BRANCH: "main" | |
RUN_ID: ${{ github.run_id }} | |
TAG: ${{ github.event.release.tag_name }} | |
AWS_S3_BUCKET_NAME: "nr-downloads-ohai-staging" | |
AWS_S3_LOCK_BUCKET_NAME: "onhost-ci-lock-staging" | |
ASSETS_TYPE: "all" | |
molecule-tests: | |
runs-on: ubuntu-latest | |
needs: [publishing-to-s3] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set and validate distribution name and go-version | |
run: .github/workflows/scripts/set_version.sh | |
- uses: newrelic/pkg-installation-testing-action@v1 | |
with: | |
gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg' | |
repo_base_url: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent" | |
package_name: ${{ env.NR_DISTRO }} | |
package_version: ${{ env.NR_VERSION }} | |
platforms: "al2,al2023,centos8,debian-bullseye,debian-bookworm,redhat8,redhat9,suse15.2,suse15.3,suse15.4,ubuntu1604,ubuntu1804,ubuntu2004,ubuntu2204,ubuntu2404" | |
packaging-tests: | |
uses: ./.github/workflows/component_provision_packaging.yml | |
needs: [publishing-to-s3] | |
secrets: | |
AWS_ROLE_ARN: ${{secrets.AWS_ROLE_ARN}} | |
AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}} | |
with: | |
TAG_OR_UNIQUE_NAME: ${{ github.event.release.tag_name }} | |
canaries: | |
uses: ./.github/workflows/component_canaries.yml | |
needs: [packaging-tests] | |
with: | |
TAG: ${{ github.ref_name }} | |
PREVIOUS_TAG: "latest" | |
PLATFORM: "linux" | |
IMAGE: "newrelic/nr-otel-collector" #should be changed after pre-release | |
secrets: | |
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} | |
AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}} | |
alerts: | |
needs: [canaries] | |
uses: ./.github/workflows/component_canary_alerts.yml | |
secrets: | |
AWS_VPC_SUBNET: ${{secrets.AWS_VPC_SUBNET}} | |
CANARIES_NR_API_KEY: ${{ secrets.CANARIES_NR_API_KEY }} | |
with: | |
TAG: ${{ github.ref_name }} | |
NR_ACCOUNT_ID: 11952800 | |
NR_REGION: Staging | |
INSTANCE_NAME_PATTERN: otel-canary:${{ github.ref_name }}-* | |
TF_STATE_KEY: nr_otel_collector_prerelease_alerts/state_${{ github.ref_name }} | |
TF_STATE_BUCKET: automation-pipeline-terraform-state | |
TF_STATE_REGION: us-east-2 | |
POLICIES_PREFIX: "nr-otel-collector-pre-release__canaries_metric_comparator" | |
REF: ${{ github.ref }} | |