From a303165f521f4c8a3c0626fd28843cb869401450 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 2 Dec 2024 11:50:30 +0100 Subject: [PATCH 1/2] ci: support updatecli version required for the new oblt updatecli policies --- .ci/updatecli/values.d/scm.yml | 7 +++++-- .github/workflows/updatecli.yml | 6 ++++++ updatecli-compose.yaml | 10 ++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.ci/updatecli/values.d/scm.yml b/.ci/updatecli/values.d/scm.yml index ff79a73ca4..1f8a711138 100644 --- a/.ci/updatecli/values.d/scm.yml +++ b/.ci/updatecli/values.d/scm.yml @@ -3,5 +3,8 @@ scm: owner: elastic repository: apm-agent-nodejs branch: main - -signedcommit: true \ No newline at end of file + commitusingapi: true + # begin update-compose policy values + user: obltmachine + email: obltmachine@users.noreply.github.com + # end update-compose policy values diff --git a/.github/workflows/updatecli.yml b/.github/workflows/updatecli.yml index 0ef635025a..8b2e5b480d 100644 --- a/.github/workflows/updatecli.yml +++ b/.github/workflows/updatecli.yml @@ -38,12 +38,18 @@ jobs: - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose diff + # TODO: update to the latest version so the policies can work as expected. + # latest changes in the policies require to use the dependson feature. + version: "v0.88.0" env: GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose apply + # TODO: update to the latest version so the policies can work as expected. + # latest changes in the policies require to use the dependson feature. + version: "v0.88.0" env: GITHUB_TOKEN: ${{ steps.get_token.outputs.token }} diff --git a/updatecli-compose.yaml b/updatecli-compose.yaml index 3239586d5c..6c81eb5a7e 100644 --- a/updatecli-compose.yaml +++ b/updatecli-compose.yaml @@ -2,13 +2,19 @@ # 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 + policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-data-spec:0.6.0@sha256:c0bbdec23541bed38df1342c95aeb601530a113db1ff11715c1c7616ed5e9e8b 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 + policy: ghcr.io/elastic/oblt-updatecli-policies/apm/apm-json-specs:0.6.0@sha256:e5a74c159ceed02fd20515ea76fa25ff81e3ccf977e74e636f9973db86aa52a5 values: - .ci/updatecli/values.d/scm.yml - .ci/updatecli/values.d/apm-json-specs.yml + + - name: Update Updatecli policies + policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.6.0@sha256:6bd6999620674b2fbb1d374f7a1a5e9740d042667f0592900b44259f3e1ae98f + values: + - .ci/updatecli/values.d/scm.yml + - .ci/updatecli/values.d/update-compose.yml From 368904d5c7f9f40397a5bcfcdb88417e32e6cd7f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 2 Dec 2024 11:53:51 +0100 Subject: [PATCH 2/2] fix --- .ci/updatecli/values.d/update-compose.yml | 3 +++ updatecli-compose.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .ci/updatecli/values.d/update-compose.yml diff --git a/.ci/updatecli/values.d/update-compose.yml b/.ci/updatecli/values.d/update-compose.yml new file mode 100644 index 0000000000..02df609f2a --- /dev/null +++ b/.ci/updatecli/values.d/update-compose.yml @@ -0,0 +1,3 @@ +spec: + files: + - "updatecli-compose.yaml" \ No newline at end of file diff --git a/updatecli-compose.yaml b/updatecli-compose.yaml index 6c81eb5a7e..efed4a1d33 100644 --- a/updatecli-compose.yaml +++ b/updatecli-compose.yaml @@ -14,7 +14,7 @@ policies: - .ci/updatecli/values.d/apm-json-specs.yml - name: Update Updatecli policies - policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.6.0@sha256:6bd6999620674b2fbb1d374f7a1a5e9740d042667f0592900b44259f3e1ae98f + policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.8.0@sha256:99e9e61b501575c2c176c39f2275998d198b590a3f6b1fe829f7315f8d457e7f values: - .ci/updatecli/values.d/scm.yml - .ci/updatecli/values.d/update-compose.yml