From 2e408e33ecacf18a4ac1af543a4dff41e6a821e1 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 28 May 2024 13:18:46 +0200 Subject: [PATCH 1/2] ci: use updatecli with GitHub secrets --- .ci/bump-elastic-stack.yml | 7 +++---- .github/workflows/bump-elastic-stack.yml | 16 +++++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.ci/bump-elastic-stack.yml b/.ci/bump-elastic-stack.yml index c07d66caf..84f4cb6be 100644 --- a/.ci/bump-elastic-stack.yml +++ b/.ci/bump-elastic-stack.yml @@ -14,12 +14,11 @@ scms: default: kind: github spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' + user: '{{ requiredEnv "GITHUB_ACTOR" }}' owner: elastic repository: apm-agent-rum-js token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' branch: main sources: @@ -32,7 +31,7 @@ sources: owner: elastic repository: elasticsearch token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' versionfilter: kind: regex pattern: ^v8\.(\d+)\.(\d+)$ diff --git a/.github/workflows/bump-elastic-stack.yml b/.github/workflows/bump-elastic-stack.yml index bd880cfd6..3c18732dc 100644 --- a/.github/workflows/bump-elastic-stack.yml +++ b/.github/workflows/bump-elastic-stack.yml @@ -16,9 +16,15 @@ jobs: - uses: actions/checkout@v4 - - uses: elastic/apm-pipeline-library/.github/actions/updatecli@current + - uses: elastic/oblt-actions/updatecli/run@v1 with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - pipeline: ./.ci/bump-elastic-stack.yml + command: "apply --config .ci/bump-elastic-stack.yml" + env: + GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + + - if: failure() + uses: elastic/oblt-actions/slack/send@v1 + with: + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: "#apm-agent-js" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on " From 900932203af2d4ad84348f482555d05938620329 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 28 May 2024 18:34:01 +0200 Subject: [PATCH 2/2] ci: updatecli signed commits --- .ci/bump-elastic-stack.yml | 1 + .github/workflows/bump-elastic-stack.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/bump-elastic-stack.yml b/.ci/bump-elastic-stack.yml index 84f4cb6be..ac2c6949f 100644 --- a/.ci/bump-elastic-stack.yml +++ b/.ci/bump-elastic-stack.yml @@ -20,6 +20,7 @@ scms: token: '{{ requiredEnv "GITHUB_TOKEN" }}' username: '{{ requiredEnv "GITHUB_ACTOR" }}' branch: main + commitusingapi: true sources: latestRelease: diff --git a/.github/workflows/bump-elastic-stack.yml b/.github/workflows/bump-elastic-stack.yml index 3c18732dc..e62afd33a 100644 --- a/.github/workflows/bump-elastic-stack.yml +++ b/.github/workflows/bump-elastic-stack.yml @@ -18,7 +18,7 @@ jobs: - uses: elastic/oblt-actions/updatecli/run@v1 with: - command: "apply --config .ci/bump-elastic-stack.yml" + command: "--experimental apply --config .ci/bump-elastic-stack.yml" env: GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}