Skip to content

Commit 6d18607

Browse files
authored
ci(bump automation): bump ubi9 for ironbank (#112298)
### What Enable updatecli [policies](https://www.updatecli.io/blog/shareable-policies) to bump the Ironbank versions automatically, then #111743 won't be manually created but when a new ubit9 version is released and available in the Ironbank system. Those policies can be found at [elastic/oblt-updatecli-policies@main/updatecli/policies/](https://github.com/elastic/oblt-updatecli-policies/tree/main/updatecli/policies/?rgh-link-date=2024-08-28T16%3A30%3A04Z) (NOTE: This is a private repository only accessible by Elastic employees) #### How to test this PR locally 1. `gh pr checkout 112298` 2. Install [updatecli](https://www.updatecli.io/docs/prologue/installation/) 3. Login to [ghcr.io](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry) 4. Diff (dry-run) ```bash $ GITHUB_TOKEN=$(gh auth token) updatecli compose diff --experimental ``` 5. Create Pull Request if new changes ```bash $ GITHUB_REPOSITORY=elastic/elasticsearch \ GITHUB_ACTOR=v1v \ GITHUB_TOKEN=$(gh auth token) \ updatecli compose apply --experimental ```
1 parent 0bed668 commit 6d18607

File tree

5 files changed

+68
-0
lines changed

5 files changed

+68
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
config:
2+
- path: distribution/docker/src/docker/iron_bank
3+
dockerfile: ../Dockerfile

.github/updatecli/values.d/scm.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
scm:
2+
enabled: true
3+
owner: elastic
4+
repository: elasticsearch
5+
branch: main
6+
commitusingapi: true
7+
# begin updatecli-compose policy values
8+
user: elasticmachine
9+
10+
# end updatecli-compose policy values
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
spec:
2+
files:
3+
- "updatecli-compose.yaml"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: updatecli-compose
3+
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '0 6 * * *'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
compose:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
packages: read
18+
pull-requests: write
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- uses: elastic/oblt-actions/updatecli/run@v1
29+
with:
30+
command: --experimental compose diff
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- uses: elastic/oblt-actions/updatecli/run@v1
35+
with:
36+
command: --experimental compose apply
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

updatecli-compose.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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.3.0@sha256:b0c841d8fb294e6b58359462afbc83070dca375ac5dd0c5216c8926872a98bb1
6+
values:
7+
- .github/updatecli/values.d/scm.yml
8+
- .github/updatecli/values.d/ironbank.yml
9+
10+
- name: Update Updatecli policies
11+
policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.4.0@sha256:254367f5b1454fd6032b88b314450cd3b6d5e8d5b6c953eb242a6464105eb869
12+
values:
13+
- .github/updatecli/values.d/scm.yml
14+
- .github/updatecli/values.d/updatecli-compose.yml

0 commit comments

Comments
 (0)