Skip to content

Commit

Permalink
updatecli: use shared updatecli policies
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Jul 9, 2024
1 parent 8463213 commit dfb76bc
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 60 deletions.
57 changes: 0 additions & 57 deletions .ci/update-specs.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .ci/updatecli/values.d/ecs-logging-specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
spec_path: tests/shared/spec/spec.json
signedcommit: true
9 changes: 9 additions & 0 deletions .ci/updatecli/values.d/scm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
scm:
enabled: true
owner: elastic
repository: ecs-logging-php
branch: main
# begin update-compose policy values
user: obltmachine
email: [email protected]
# end update-compose policy values
3 changes: 3 additions & 0 deletions .ci/updatecli/values.d/update-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
spec:
files:
- "update-compose.yaml"
20 changes: 17 additions & 3 deletions .github/workflows/update-specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,29 @@ permissions:
contents: read

jobs:
bump:
compose:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:

- uses: actions/checkout@v4

- uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental compose diff
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: "--experimental apply --config .ci/update-specs.yml"
command: --experimental compose apply
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

Expand Down
14 changes: 14 additions & 0 deletions update-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Config file for `updatecli compose ...`.
# https://www.updatecli.io/docs/core/compose/
policies:
- name: Handle ecs-logging specs
policy: ghcr.io/elastic/oblt-updatecli-policies/apm/ecs-logging-specs:0.3.0@sha256:6c765407764d391d6d65b04c54ba409977decc24a000d5b8d7839f58bcd07c5b
values:
- .ci/updatecli/values.d/scm.yml
- .ci/updatecli/values.d/ecs-logging-specs.yml

- name: Update Updatecli policies
policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.4.0@sha256:254367f5b1454fd6032b88b314450cd3b6d5e8d5b6c953eb242a6464105eb869
values:
- .ci/updatecli/values.d/scm.yml
- .ci/updatecli/values.d/update-compose.yml

0 comments on commit dfb76bc

Please sign in to comment.