From 299f5bd457b44ddb568f46a419653c2bd1c15047 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 28 May 2024 18:27:13 +0200 Subject: [PATCH] ci: use updatecli with GitHub secrets (#282) --- .ci/updatecli.d/bump-version.yml | 8 ++++---- .github/workflows/updatecli.yml | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.ci/updatecli.d/bump-version.yml b/.ci/updatecli.d/bump-version.yml index 3b3cfc3..e0d5ae2 100644 --- a/.ci/updatecli.d/bump-version.yml +++ b/.ci/updatecli.d/bump-version.yml @@ -10,13 +10,13 @@ scms: githubConfig: kind: github spec: - user: '{{ requiredEnv "GIT_USER" }}' - email: '{{ requiredEnv "GIT_EMAIL" }}' + user: '{{ requiredEnv "GITHUB_ACTOR" }}' owner: elastic repository: opbeans-java token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' branch: main + commitusingapi: true actions: opbeans-java: @@ -37,7 +37,7 @@ sources: owner: elastic repository: apm-agent-java token: '{{ requiredEnv "GITHUB_TOKEN" }}' - username: '{{ requiredEnv "GIT_USER" }}' + username: '{{ requiredEnv "GITHUB_ACTOR" }}' versionfilter: kind: semver transformers: diff --git a/.github/workflows/updatecli.yml b/.github/workflows/updatecli.yml index 5df8f78..80be37c 100644 --- a/.github/workflows/updatecli.yml +++ b/.github/workflows/updatecli.yml @@ -17,16 +17,16 @@ jobs: with: java-version: 11 distribution: temurin - - 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/updatecli.d + command: "--experimental apply --config .ci/updatecli.d" + env: + GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} + - if: failure() - uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current + uses: elastic/oblt-actions/slack/send@v1 with: - vaultUrl: ${{ secrets.VAULT_ADDR }} - vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} - vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} - slackChannel: "#apm-agent-java" + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: "#apm-agent-java" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on "