Skip to content

Commit c332683

Browse files
authored
Merge branch 'main' into ci/test-race
2 parents 5300f8b + e258527 commit c332683

File tree

88 files changed

+1314
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1314
-823
lines changed

.buildkite/scripts/dra.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ DRA_BRANCH="$BUILDKITE_BRANCH"
3434
dra_command=collect
3535
BRANCHES_URL=https://storage.googleapis.com/artifacts-api/snapshots/branches.json
3636
curl -s "${BRANCHES_URL}" > active-branches.json
37-
if ! grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
37+
# as long as `8.x` is not in the active branches, we will explicitly add the condition.
38+
if [ "$BUILDKITE_BRANCH" == "8.x" ] || grep -q "\"$BUILDKITE_BRANCH\"" active-branches.json ; then
39+
echo "--- :arrow_right: Release Manager only supports the current active branches and 8.x, running"
40+
else
41+
# If no active branches are found, let's see if it is a feature branch.
3842
echo "--- :arrow_right: Release Manager only supports the current active branches, skipping"
3943
echo "BUILDKITE_BRANCH=$BUILDKITE_BRANCH"
4044
echo "BUILDKITE_COMMIT=$BUILDKITE_COMMIT"
@@ -98,6 +102,7 @@ dra() {
98102
}
99103

100104
dra "snapshot" "$dra_command"
101-
if [[ "${DRA_BRANCH}" != "main" ]]; then
105+
if [[ "${DRA_BRANCH}" != "main" && "${DRA_BRANCH}" != "8.x" ]]; then
106+
echo "DRA_BRANCH is neither 'main' nor '8.x'"
102107
dra "staging" "$dra_command"
103108
fi

.ci/bump-elastic-stack-snapshot.yml .ci/updatecli/bump-elastic-stack-snapshot.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ scms:
2121
kind: github
2222
spec:
2323
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
24-
owner: elastic
25-
repository: apm-server
24+
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
25+
owner: '{{ .scm.owner }}'
26+
repository: '{{ .scm.repository }}'
2627
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
2728
branch: '{{ requiredEnv "BRANCH" }}'
2829
commitusingapi: true

.ci/bump-golang.yml .ci/updatecli/bump-golang.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ scms:
2424
kind: github
2525
spec:
2626
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
27-
owner: elastic
28-
repository: apm-server
27+
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
28+
owner: '{{ .scm.owner }}'
29+
repository: '{{ .scm.repository }}'
2930
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
3031
branch: '{{ requiredEnv "GITHUB_BRANCH" }}'
3132
commitusingapi: true

.ci/update-beats.yml .ci/updatecli/update-beats.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ scms:
77
kind: github
88
spec:
99
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
10-
owner: elastic
11-
repository: apm-server
10+
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
11+
owner: '{{ .scm.owner }}'
12+
repository: '{{ .scm.repository }}'
1213
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
1314
branch: '{{ requiredEnv "BRANCH_NAME" }}'
1415
commitusingapi: true

.ci/updatecli/values.d/ironbank.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
config:
2+
- path: packaging/ironbank

.ci/updatecli/values.d/scm.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
scm:
2+
enabled: true
3+
owner: elastic
4+
repository: apm-server
5+
branch: main
6+
commitusingapi: true
7+
# begin updatecli-compose policy values
8+
user: obltmachine
9+
# end updatecli-compose policy values
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spec:
2+
files:
3+
- "updatecli-compose.yaml"

.github/workflows/benchmarks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
with:
9191
role-duration-seconds: 18000 # 5 hours
9292

93-
- uses: google-github-actions/get-secretmanager-secrets@dc4a1392bad0fd60aee00bb2097e30ef07a1caae # v2.1.3
93+
- uses: google-github-actions/get-secretmanager-secrets@95a0b09b8348ef3d02c68c6ba5662a037e78d713 # v2.1.4
9494
with:
9595
export_to_environment: true
9696
secrets: |-
@@ -170,7 +170,7 @@ jobs:
170170

171171
# Notify result to Slack only on schedule (nightly run)
172172
- if: github.event_name == 'schedule'
173-
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
173+
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
174174
env:
175175
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
176176
with:

.github/workflows/bump-elastic-stack.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix: ${{ steps.generator.outputs.matrix }}
1818
steps:
1919
- id: generator
20-
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current
20+
uses: elastic/oblt-actions/elastic/active-branches@v1
2121

2222
bump-elastic-stack:
2323
runs-on: ubuntu-latest
@@ -30,15 +30,27 @@ jobs:
3030
with:
3131
ref: ${{ matrix.branch }}
3232

33-
- uses: elastic/oblt-actions/updatecli/[email protected]
33+
- name: Get token
34+
id: get_token
35+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
3436
with:
35-
command: --experimental apply --config .ci/bump-elastic-stack-snapshot.yml
37+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
38+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
39+
permissions: >-
40+
{
41+
"contents": "write",
42+
"pull_requests": "write"
43+
}
44+
45+
- uses: elastic/oblt-actions/updatecli/run@v1
46+
with:
47+
command: --experimental apply --config .ci/updatecli/bump-elastic-stack-snapshot.yml --values .ci/updatecli/values.d/scm.yml
3648
env:
3749
BRANCH: ${{ matrix.branch }}
38-
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
50+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
3951

4052
- if: ${{ failure() }}
41-
uses: elastic/oblt-actions/slack/send@v1.9.1
53+
uses: elastic/oblt-actions/slack/send@v1
4254
with:
4355
channel-id: '#apm-server'
4456
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"

.github/workflows/bump-golang.yml

+22-10
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- id: generate
2121
name: Generate matrix
22-
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current
22+
uses: elastic/oblt-actions/elastic/active-branches@v1
2323
with:
2424
exclude-branches: '7.17,main'
2525
- uses: actions/github-script@v7
@@ -41,11 +41,23 @@ jobs:
4141

4242
- uses: actions/checkout@v4
4343

44-
- uses: elastic/oblt-actions/updatecli/[email protected]
44+
- name: Get token
45+
id: get_token
46+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
4547
with:
46-
command: --experimental apply --config .ci/bump-golang.yml
48+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
49+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
50+
permissions: >-
51+
{
52+
"contents": "write",
53+
"pull_requests": "write"
54+
}
55+
56+
- uses: elastic/oblt-actions/updatecli/run@v1
57+
with:
58+
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml
4759
env:
48-
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
60+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
4961
GITHUB_BRANCH: 'main'
5062
GITHUB_LABELS: ${{ needs.labels.outputs.backports }}
5163

@@ -56,11 +68,11 @@ jobs:
5668
with:
5769
ref: '7.17'
5870

59-
- uses: elastic/oblt-actions/updatecli/run@v1.9.1
71+
- uses: elastic/oblt-actions/updatecli/run@v1
6072
with:
61-
command: --experimental apply --config .ci/bump-golang.yml
73+
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml
6274
env:
63-
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
75+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
6476
GITHUB_BRANCH: '7.17'
6577
GITHUB_LABELS: 'backport-skip'
6678

@@ -70,11 +82,11 @@ jobs:
7082
if: always()
7183
steps:
7284
- id: check
73-
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
85+
uses: elastic/oblt-actions/check-dependent-jobs@v1
7486
with:
75-
needs: ${{ toJSON(needs) }}
87+
jobs: ${{ toJSON(needs) }}
7688
- if: ${{ steps.check.outputs.isSuccess == 'false' }}
77-
uses: elastic/oblt-actions/slack/send@v1.9.1
89+
uses: elastic/oblt-actions/slack/send@v1
7890
with:
7991
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
8092
channel-id: "#apm-server"

.github/workflows/check-docker-compose.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix: ${{ steps.generator.outputs.matrix }}
1818
steps:
1919
- id: generator
20-
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current
20+
uses: elastic/oblt-actions/elastic/active-branches@v1
2121

2222
check-docker-compose:
2323
needs:
@@ -47,9 +47,9 @@ jobs:
4747
- check-docker-compose
4848
steps:
4949
- id: check
50-
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
50+
uses: elastic/oblt-actions/check-dependent-jobs@v1
5151
with:
52-
needs: ${{ toJSON(needs) }}
52+
jobs: ${{ toJSON(needs) }}
5353
- run: ${{ steps.check.outputs.isSuccess }}
5454
- if: failure()
5555
uses: elastic/oblt-actions/slack/notify-result@v1

.github/workflows/ci.yml

+24
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,27 @@ jobs:
111111
env:
112112
GH_TOKEN: ${{ github.token }}
113113
- run: make publish-docker-images
114+
115+
# Only for forked PRs, when changing the .go-version, then we need to note that the wolfi docker image needs to be
116+
# validated
117+
validate-wolfi-docker-image:
118+
runs-on: ubuntu-latest
119+
if: ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true ) || github.actor == 'dependabot[bot]'
120+
steps:
121+
- uses: actions/checkout@v4
122+
- name: Get changed files
123+
id: changed-files
124+
uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45.0.2
125+
with:
126+
files: .go-version
127+
128+
- name: If .go-version changed validate docker image is available.
129+
if: steps.changed-files.outputs.any_changed == 'true'
130+
run: |
131+
echo "If you change the .go-version please use a branch in the upstream repository to validate the wolfi images with test-package-and-push."
132+
echo "Otherwise, this validation will run and fail the CI build."
133+
echo "Please validate the wolfi image is available by running the following command:"
134+
echo "::notice::docker pull docker.elastic.co/wolfi/go:$(cat .go-version)"
135+
echo "If they are available you could skip this validation."
136+
echo "However, we recommend to use an upstream branch to run the CI specialised steps for the packaging system."
137+
exit 1

.github/workflows/microbenchmark.yml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- main
1010
- "8.[0-9]+"
11+
- "8.x"
1112
paths-ignore:
1213
- '**.md'
1314
- '**.asciidoc'

.github/workflows/smoke-tests-ess.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- uses: elastic/oblt-actions/google/auth@v1
6161

62-
- uses: google-github-actions/get-secretmanager-secrets@dc4a1392bad0fd60aee00bb2097e30ef07a1caae # v2.1.3
62+
- uses: google-github-actions/get-secretmanager-secrets@95a0b09b8348ef3d02c68c6ba5662a037e78d713 # v2.1.4
6363
with:
6464
export_to_environment: true
6565
secrets: |-

.github/workflows/smoke-tests-os.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
- uses: elastic/oblt-actions/google/auth@v1
5555

56-
- uses: google-github-actions/get-secretmanager-secrets@dc4a1392bad0fd60aee00bb2097e30ef07a1caae # v2.1.3
56+
- uses: google-github-actions/get-secretmanager-secrets@95a0b09b8348ef3d02c68c6ba5662a037e78d713 # v2.1.4
5757
with:
5858
export_to_environment: true
5959
secrets: |-

.github/workflows/smoke-tests-schedule.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- id: generate
2222
name: Generate matrix
23-
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current
23+
uses: elastic/oblt-actions/elastic/active-branches@v1
2424
with:
2525
exclude-branches: '7.17'
2626

@@ -57,9 +57,9 @@ jobs:
5757
- smoke-tests-ess
5858
steps:
5959
- id: check
60-
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
60+
uses: elastic/oblt-actions/check-dependent-jobs@v1
6161
with:
62-
needs: ${{ toJSON(needs) }}
62+
jobs: ${{ toJSON(needs) }}
6363
- uses: elastic/oblt-actions/slack/[email protected]
6464
with:
6565
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/test-reporter.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
system-test-results:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
19+
- uses: elastic/oblt-actions/test-report@v1
2020
with:
21-
artifact: test-results # artifact name
22-
name: System Tests Results # Name of the check run which will be created
21+
artifact: /test-results-(.*)/ # artifact name pattern
22+
name: 'Test Results $1' # Name of the check run which will be created
2323
path: "*.xml" # Path to test results (inside artifact .zip)
2424
reporter: java-junit # Format of test results

.github/workflows/update-beats.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix: ${{ steps.generator.outputs.matrix }}
1717
steps:
1818
- id: generator
19-
uses: elastic/apm-pipeline-library/.github/actions/elastic-stack-snapshot-branches@current
19+
uses: elastic/oblt-actions/elastic/active-branches@v1
2020
bump:
2121
needs:
2222
- filter
@@ -29,19 +29,31 @@ jobs:
2929
with:
3030
ref: ${{ matrix.branch }}
3131

32+
- name: Get token
33+
id: get_token
34+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
35+
with:
36+
app_id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
37+
private_key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
38+
permissions: >-
39+
{
40+
"contents": "write",
41+
"pull_requests": "write"
42+
}
43+
3244
- uses: actions/setup-go@v5
3345
with:
3446
go-version-file: go.mod
3547

36-
- uses: elastic/oblt-actions/updatecli/run@v1.9.1
48+
- uses: elastic/oblt-actions/updatecli/run@v1
3749
with:
38-
command: --experimental apply --config .ci/update-beats.yml
50+
command: --experimental apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml
3951
env:
4052
BRANCH_NAME: ${{ matrix.branch }}
41-
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
53+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
4254

4355
- if: ${{ failure() }}
44-
uses: elastic/oblt-actions/slack/send@v1.9.1
56+
uses: elastic/oblt-actions/slack/send@v1
4557
with:
4658
channel-id: '#apm-server'
4759
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>"

0 commit comments

Comments
 (0)