Skip to content

Commit

Permalink
updatecli: use shared policy (#4121)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored and trentm committed Jul 24, 2024
1 parent 0edf02d commit 8af0f3c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 182 deletions.
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.

1 change: 1 addition & 0 deletions .ci/updatecli/values.d/apm-data-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apm_schema_specs_path: test/integration/api-schema/apm-server-schema
1 change: 1 addition & 0 deletions .ci/updatecli/values.d/apm-json-specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apm_json_specs_path: test/fixtures/json-specs
7 changes: 7 additions & 0 deletions .ci/updatecli/values.d/scm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
scm:
enabled: true
owner: elastic
repository: apm-agent-nodejs
branch: main

signedcommit: true
12 changes: 0 additions & 12 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
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 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 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 8af0f3c

Please sign in to comment.