Skip to content

Commit 584bd10

Browse files
authored
updatecli: use shared updatecli policies (#264)
1 parent 7dfbd11 commit 584bd10

File tree

6 files changed

+48
-65
lines changed

6 files changed

+48
-65
lines changed

.ci/update-specs.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
spec_path: ecs-logging-core/src/test/resources/spec/spec.json
2+
signedcommit: true

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
scm:
2+
enabled: true
3+
owner: elastic
4+
repository: ecs-logging-java
5+
branch: main
6+
# begin update-compose policy values
7+
user: obltmachine
8+
9+
# end update-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+
- "update-compose.yaml"

.github/workflows/update-specs.yml renamed to .github/workflows/updatecli.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
1-
---
2-
# Send PRs to the subscribed ECS Agents if the spec files (JSON) are modified
3-
name: update-specs
1+
name: updatecli
42

53
on:
6-
workflow_dispatch:
4+
workflow_dispatch: ~
75
schedule:
86
- cron: '0 6 * * *'
97

108
permissions:
119
contents: read
1210

1311
jobs:
14-
bump:
12+
compose:
1513
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: read
1617
steps:
17-
1818
- uses: actions/checkout@v4
1919

20+
- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- uses: elastic/oblt-actions/updatecli/run@v1
27+
with:
28+
command: --experimental compose diff
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
31+
2032
- uses: elastic/oblt-actions/updatecli/run@v1
2133
with:
22-
command: "--experimental apply --config .ci/update-specs.yml"
34+
command: --experimental compose apply
2335
env:
2436
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}
2537

2638
- if: failure()
27-
uses: elastic/oblt-actions/slack/send@v1.2.0
39+
uses: elastic/oblt-actions/slack/send@v1
2840
with:
2941
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
3042
channel-id: "#apm-agent-java"

update-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 ecs-logging specs
5+
policy: ghcr.io/elastic/oblt-updatecli-policies/apm/ecs-logging-specs:0.3.0@sha256:6c765407764d391d6d65b04c54ba409977decc24a000d5b8d7839f58bcd07c5b
6+
values:
7+
- .ci/updatecli/values.d/scm.yml
8+
- .ci/updatecli/values.d/ecs-logging-specs.yml
9+
10+
- name: Update Updatecli policies
11+
policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.4.0@sha256:254367f5b1454fd6032b88b314450cd3b6d5e8d5b6c953eb242a6464105eb869
12+
values:
13+
- .ci/updatecli/values.d/scm.yml
14+
- .ci/updatecli/values.d/update-compose.yml

0 commit comments

Comments
 (0)