forked from elastic/apm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (83 loc) · 2.91 KB
/
smoke-tests-ess.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: smoke-tests-ess
run-name: Smoke Tests ESS
on:
workflow_call:
inputs:
branch:
required: true
type: string
workflow_dispatch:
inputs:
branch:
description: 'The branch to checkout'
required: true
type: string
# limit the access of the generated GITHUB_TOKEN
permissions:
contents: read
jobs:
prepare:
name: Generate smoke tests list
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.generate.outputs.tests }}
date: ${{ steps.generate.outputs.date }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- id: generate
name: Generate matrix and date
uses: ./.github/workflows/generate-smoke-tests-list
smoke-tests-ess:
name: Run smoke tests ${{ matrix.test }} for ${{ matrix.version }}
runs-on: ubuntu-latest
needs: prepare
permissions:
contents: read
id-token: write
env:
TF_VAR_BUILD_ID: ${{ github.run_id }}
TF_VAR_ENVIRONMENT: 'ci'
TF_VAR_BRANCH: ${{ github.ref_name }}
TF_VAR_REPO: ${{ github.repository }}
TF_VAR_CREATED_DATE: ${{ needs.prepare.outputs.date }}
strategy:
fail-fast: false
matrix:
test: ${{ fromJSON(needs.prepare.outputs.tests) }}
version:
- '7.17'
- 'latest'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ~1.10.0
terraform_wrapper: false
- name: Setup cluster env
uses: ./.github/workflows/setup-cluster-env
- uses: elastic/oblt-actions/aws/auth@v1
- uses: elastic/oblt-actions/google/auth@v1
- uses: google-github-actions/get-secretmanager-secrets@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
with:
export_to_environment: true
secrets: |-
EC_API_KEY:elastic-observability/elastic-cloud-observability-team-pro-api-key
- name: Run smoke tests ${{ matrix.test }} for ${{ matrix.version }}
run: make smoketest/run-version TEST_DIR=${{ matrix.test }} SMOKETEST_VERSION=${{ matrix.version }}
# 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@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
if: always()
with:
export_to_environment: true
secrets: |-
EC_API_KEY:elastic-observability/elastic-cloud-observability-team-pro-api-key
- if: always()
name: Teardown smoke test infra
run: make smoketest/cleanup TEST_DIR=${{ matrix.test }}