Skip to content

Commit

Permalink
updatecli: use shared policy
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Jul 5, 2024
1 parent f77a96b commit 56f18d5
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 267 deletions.
2 changes: 2 additions & 0 deletions .ci/updatecli/apm-data-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apm_schema_specs_path: apm-agent-core/src/test/resources/apm-server-schema/current
signedcommit: true
2 changes: 2 additions & 0 deletions .ci/updatecli/apm-gherkin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apm_gherkin_specs_path: apm-agent-core/src/test/resources/specs
signedcommit: true
2 changes: 2 additions & 0 deletions .ci/updatecli/apm-json-specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apm_json_specs_path: apm-agent-core/src/test/resources/json-specs
signedcommit: true
6 changes: 6 additions & 0 deletions .ci/updatecli/scm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
scm:
enabled: true
owner: elastic
repository: apm-agent-java
apm_repository: apm
branch: main
83 changes: 0 additions & 83 deletions .ci/updatecli/updatecli.d/update-gherkin-specs.yml

This file was deleted.

83 changes: 0 additions & 83 deletions .ci/updatecli/updatecli.d/update-json-specs.yml

This file was deleted.

85 changes: 0 additions & 85 deletions .ci/updatecli/updatecli.d/update-specs.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .ci/updatecli/values.yml

This file was deleted.

19 changes: 17 additions & 2 deletions .github/workflows/updatecli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,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/updatecli/updatecli.d --values .ci/updatecli/values.yml"
command: --experimental compose apply
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

Expand Down
18 changes: 18 additions & 0 deletions update-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
policies:
- name: Handle apm-data server specs
policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-data-spec:0.2.0@sha256:7069c0773d44a74c4c8103b4d9957b468f66081ee9d677238072fe11c4d2197c
values:
- .ci/updatecli/values.d/scm.yml
- .ci/updatecli/values.d/apm-data-spec.yml

- name: Handle apm gherkin specs
policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-gherkin:0.2.0@sha256:26a30ad2b98a6e4cb17fb88a28fa3277ced8ca862d6388943afaafbf8ee96e7d
values:
- .ci/updatecli/values.d/scm.yml
- .ci/updatecli/values.d/apm-gherkin.yml

- name: Handle apm json specs
policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-json-specs:0.2.0@sha256:969a6d21eabd6ebea66cb29b35294a273d6dbc0f7da78589c416aedf08728e78
values:
- .ci/updatecli/values.d/scm.yml
- .ci/updatecli/values.d/apm-json-specs.yml

0 comments on commit 56f18d5

Please sign in to comment.