Start using elastic-observability-ci google cloud project for ci secr… #337
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
| name: smoke-tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| smoketest_versions: | |
| description: Set SMOKETEST_VERSIONS environment variable | |
| default: latest | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| SSH_KEY: "./id_rsa_terraform" | |
| TF_VAR_private_key: "./id_rsa_terraform" | |
| TF_VAR_public_key: "./id_rsa_terraform.pub" | |
| TF_VAR_github_workflow_id: "apm-aws-lambda-${{ github.run_id }}-${{ github.run_number }}" | |
| TF_VAR_BUILD_ID: "${{ github.run_id }}" | |
| TF_VAR_ENVIRONMENT: 'ci' | |
| TF_VAR_BRANCH: "${{ github.ref_name }}" | |
| TF_VAR_REPO: "${{ github.repository }}" | |
| SMOKETEST_VERSIONS: "${{ inputs.smoketest_versions || 'latest' }}" | |
| SKIP_DESTROY: 0 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Bootstrap Action Workspace | |
| uses: ./.github/actions/bootstrap | |
| with: | |
| goreleaser: 'true' | |
| - uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3 | |
| with: | |
| terraform_version: 1.2.3 | |
| - uses: elastic/oblt-actions/aws/auth@v1 | |
| - uses: elastic/oblt-actions/google/auth@v1 | |
| with: | |
| project-number: '911195782929' | |
| - uses: google-github-actions/get-secretmanager-secrets@bc9c54b29fdffb8a47776820a7d26e77b379d262 # v3.0.0 | |
| with: | |
| export_to_environment: true | |
| secrets: |- | |
| EC_API_KEY:elastic-observability/elastic-cloud-observability-team-pro-api-key | |
| - run: make smoketest/run | |
| # Secrets are rotated daily, if the benchmarks run between the rotation window, then | |
| # there is a high chance things will stop working | |
| # This is trying to reduce the chances of that happening. | |
| # See https://github.com/elastic/observability-test-environments/actions/workflows/cluster-rotate-api-keys.yml | |
| - uses: google-github-actions/get-secretmanager-secrets@bc9c54b29fdffb8a47776820a7d26e77b379d262 # v3.0.0 | |
| if: always() | |
| with: | |
| export_to_environment: true | |
| secrets: |- | |
| EC_API_KEY:elastic-observability/elastic-cloud-observability-team-pro-api-key | |
| - if: always() | |
| name: Tear down | |
| run: make smoketest/cleanup | |
| - if: always() | |
| uses: elastic/oblt-actions/slack/notify-result@v1 | |
| with: | |
| bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| channel-id: "#apm-aws-lambda" |