Skip to content

Commit 9b06b66

Browse files
authored
[8.17](backport #9082) deps: use the latest updatecli version and use oblt-actions (#9146)
1 parent 1017b73 commit 9b06b66

File tree

6 files changed

+139
-41
lines changed

6 files changed

+139
-41
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: update-beats
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * 1-5'
7+
8+
permissions:
9+
contents: read
10+
11+
env:
12+
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
13+
14+
jobs:
15+
filter:
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 1
18+
outputs:
19+
matrix: ${{ steps.generator.outputs.matrix }}
20+
permissions:
21+
contents: read
22+
steps:
23+
- id: generator
24+
uses: elastic/oblt-actions/elastic/active-branches@v1
25+
with:
26+
exclude-branches: "7.17,8.17,8.18,9.0"
27+
filter-branches: true
28+
29+
update-beats:
30+
permissions:
31+
contents: write
32+
pull-requests: write
33+
needs:
34+
- filter
35+
runs-on: ubuntu-latest
36+
strategy:
37+
fail-fast: false
38+
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
ref: ${{ matrix.branch }}
43+
44+
- name: Set up Go
45+
uses: actions/setup-go@v5
46+
with:
47+
go-version-file: 'go.mod'
48+
49+
- name: Install mage
50+
uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
51+
with:
52+
version: v1.14.0
53+
install-only: true
54+
55+
- name: Run Updatecli in Apply mode
56+
uses: elastic/oblt-actions/updatecli/run@v1
57+
with:
58+
command: apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml
59+
version-file: .updatecli-version
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
BRANCH_NAME: ${{ matrix.branch }}
63+
64+
- if: ${{ failure() }}
65+
uses: elastic/oblt-actions/slack/send@v1
66+
with:
67+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
68+
channel-id: "#ingest-notifications"
69+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"

.github/workflows/bump-golang.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,16 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24-
- name: Install Updatecli in the runner
25-
uses: updatecli/updatecli-action@f11c0cb3aca7a018d6000dc86a57eb3442277219 # 2.81.0
26-
27-
- name: Run Updatecli in Apply mode
28-
run: updatecli apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml
24+
- uses: elastic/oblt-actions/updatecli/run@v1
25+
with:
26+
command: apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml
27+
version-file: .updatecli-version
2928
env:
3029
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3130

3231
- if: ${{ failure() }}
33-
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
32+
uses: elastic/oblt-actions/slack/send@v1
3433
with:
35-
channel-id: '#ingest-notifications'
36-
payload: |
37-
{
38-
"text": "${{ env.SLACK_MESSAGE }}",
39-
"blocks": [
40-
{
41-
"type": "section",
42-
"text": {
43-
"type": "mrkdwn",
44-
"text": "${{ env.SLACK_MESSAGE }}"
45-
}
46-
}
47-
]
48-
}
49-
env:
50-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
51-
SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"
34+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
35+
channel-id: "#ingest-notifications"
36+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: bump-otel-version
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '24 5 * * 1-5'
7+
8+
permissions:
9+
contents: read
10+
11+
env:
12+
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
13+
14+
jobs:
15+
update-otel:
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
runs-on: ubuntu-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
branch: ["main", "8.19"]
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Set up Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version-file: 'go.mod'
31+
32+
- name: Install mage
33+
uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
34+
with:
35+
version: v1.14.0
36+
install-only: true
37+
38+
- name: Run Updatecli in Apply mode
39+
uses: elastic/oblt-actions/updatecli/run@v1
40+
with:
41+
command: apply --config .ci/updatecli/update-otel.yml --values .ci/updatecli/values.d/scm.yml
42+
version-file: .updatecli-version
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
BRANCH_NAME: ${{ matrix.branch }}
46+
47+
- if: ${{ failure() }}
48+
uses: elastic/oblt-actions/slack/send@v1
49+
with:
50+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
51+
channel-id: "#ingest-notifications"
52+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"

.github/workflows/bump-vm-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- uses: elastic/oblt-actions/updatecli/run@v1
4646
with:
4747
command: apply --config .ci/updatecli/updatecli-bump-vm-images.yml --values .ci/updatecli/values.d/scm.yml
48+
version-file: .updatecli-version
4849
env:
4950
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5051
BRANCH_NAME: ${{ matrix.branch }}

.github/workflows/updatecli-compose.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,32 +28,22 @@ jobs:
2828
- uses: elastic/oblt-actions/updatecli/run@v1
2929
with:
3030
command: --experimental compose diff
31+
version-file: .updatecli-version
3132
env:
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334

3435
- uses: elastic/oblt-actions/updatecli/run@v1
3536
with:
3637
command: --experimental compose apply
38+
version-file: .updatecli-version
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3941

4042
- if: ${{ failure() }}
41-
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
42-
with:
43-
channel-id: '#ingest-notifications'
44-
payload: |
45-
{
46-
"text": "${{ env.SLACK_MESSAGE }}",
47-
"blocks": [
48-
{
49-
"type": "section",
50-
"text": {
51-
"type": "mrkdwn",
52-
"text": "${{ env.SLACK_MESSAGE }}"
53-
}
54-
}
55-
]
56-
}
43+
uses: elastic/oblt-actions/slack/send@v1
5744
env:
58-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
59-
SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"
45+
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
46+
with:
47+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
48+
channel-id: "#ingest-notifications"
49+
message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>"

.updatecli-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.104.0

0 commit comments

Comments
 (0)