Skip to content

Commit 87e2ff3

Browse files
committed
updatecli: manage UBI and updatecli versions
Automate elastic#18426 and already applied in other projects see elastic/apm-server#19558
1 parent 4abb46c commit 87e2ff3

File tree

4 files changed

+88
-0
lines changed

4 files changed

+88
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
config:
2+
- path: docker/templates
3+
dockerfile: IronbankDockerfile.erb
4+
manifest: hardening_manifest.yaml.erb
5+
6+
pull_request:
7+
labels:
8+
- dependencies
9+
- backport-active-all
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
path: .updatecli-version
2+
3+
pull_request:
4+
labels:
5+
- dependencies
6+
- backport-skip
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: update-compose
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 6 * * 1'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
compose:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: read
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Get token
22+
id: get_token
23+
uses: actions/create-github-app-token@v2
24+
with:
25+
app-id: ${{ secrets.OBS_AUTOMATION_APP_ID }}
26+
private-key: ${{ secrets.OBS_AUTOMATION_APP_PEM }}
27+
owner: ${{ github.repository_owner }}
28+
repositories: |
29+
apm-server
30+
permission-contents: write
31+
permission-pull-requests: write
32+
33+
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- uses: elastic/oblt-actions/updatecli/run@v1
40+
with:
41+
command: compose diff
42+
env:
43+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
44+
45+
- uses: elastic/oblt-actions/updatecli/run@v1
46+
with:
47+
command: compose apply
48+
env:
49+
GITHUB_TOKEN: ${{ steps.get_token.outputs.token }}
50+
51+
- if: ${{ failure() }}
52+
uses: elastic/oblt-actions/slack/send@v1
53+
with:
54+
channel-id: '#apm-server'
55+
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>"
56+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}

updatecli-compose.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Config file for `updatecli compose ...`.
2+
# https://www.updatecli.io/docs/core/compose/
3+
policies:
4+
- name: Handle ironbank bumps
5+
policy: ghcr.io/elastic/oblt-updatecli-policies/ironbank/templates:0.5.3@sha256:1d5b2f8ca1c141ebe0368d39ec1cdf8bc32662795a21416907eb02b8bf40d890
6+
values:
7+
- .ci/updatecli/values.d/scm.yml
8+
- .ci/updatecli/values.d/ironbank.yml
9+
- name: Handle updatecli bumps
10+
policy: ghcr.io/elastic/oblt-updatecli-policies/updatecli/version:0.2.0@sha256:013a37ddcdb627c46e7cba6fb9d1d7bc144584fa9063843ae7ee0f6ef26b4bea
11+
values:
12+
- .ci/updatecli/values.d/scm.yml
13+
- .ci/updatecli/values.d/updatecli.yml
14+
- name: Update Updatecli policies
15+
policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.9.1@sha256:5bbca67a9e31bf5432d5cae1452b9fc770014151ddd856f367ccb9ba46f6f8bb
16+
values:
17+
- .ci/updatecli/values.d/scm.yml

0 commit comments

Comments
 (0)