diff --git a/.github/workflows/bump-elastic-stack-snapshot.yml b/.github/workflows/bump-elastic-stack-snapshot.yml index 566785346b45..2752ee145547 100644 --- a/.github/workflows/bump-elastic-stack-snapshot.yml +++ b/.github/workflows/bump-elastic-stack-snapshot.yml @@ -31,33 +31,14 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Updatecli in the runner - uses: updatecli/updatecli-action@ae3030ce1710c6496214fb1f8fd3bd9437b2a69d # v2.82.0 - - - name: Run Updatecli in Apply mode - run: updatecli --experimental apply --config .github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml --values .github/workflows/updatecli.d/values.d/scm.yml + - uses: elastic/oblt-actions/updatecli/run-and-notify@v1 + with: + command: --experimental apply --config .github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml --values .github/workflows/updatecli.d/values.d/scm.yml + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel-id: "#ingest-notifications" + slack-message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on " + slack-send-when: "failure" + version-file: .tool-versions env: BRANCH: ${{ matrix.branch }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - if: ${{ failure() }} - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 - with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} - payload: | - { - "channel": "#ingest-notifications", - "text": "${{ env.SLACK_MESSAGE }}", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ env.SLACK_MESSAGE }}" - } - } - ] - } - env: - SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index f7ef4016814a..87da09ef5000 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -22,32 +22,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Updatecli in the runner - uses: updatecli/updatecli-action@ae3030ce1710c6496214fb1f8fd3bd9437b2a69d # v2.82.0 - - - name: Run Updatecli in Apply mode - run: updatecli --experimental apply --config .github/workflows/updatecli.d/${{ matrix.file }} --values .github/workflows/updatecli.d/values.d/scm.yml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - if: ${{ failure() }} - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 + - uses: elastic/oblt-actions/updatecli/run-and-notify@v1 with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} - payload: | - { - "channel": "#ingest-notifications", - "text": "${{ env.SLACK_MESSAGE }}", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ env.SLACK_MESSAGE }}" - } - } - ] - } + command: --experimental apply --config .github/workflows/updatecli.d/${{ matrix.file }} --values .github/workflows/updatecli.d/values.d/scm.yml + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel-id: "#ingest-notifications" + slack-message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on " + slack-send-when: "failure" + version-file: .tool-versions env: - SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/updatecli-compose.yml b/.github/workflows/updatecli-compose.yml index c3fbca37066b..d3406a615106 100644 --- a/.github/workflows/updatecli-compose.yml +++ b/.github/workflows/updatecli-compose.yml @@ -25,38 +25,24 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - uses: elastic/oblt-actions/updatecli/run@v1 + - uses: elastic/oblt-actions/updatecli/run-and-notify@v1 with: command: --experimental compose diff + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel-id: "#ingest-notifications" + slack-message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on " + slack-send-when: "failure" + version-file: .tool-versions env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: elastic/oblt-actions/updatecli/run@v1 + - uses: elastic/oblt-actions/updatecli/run-and-notify@v1 with: command: --experimental compose apply + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel-id: "#ingest-notifications" + slack-message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, @robots-ci please look what's going on " + slack-send-when: "failure" + version-file: .tool-versions env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - if: ${{ failure() }} - name: Report obsoleted branches (slack) - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 - with: - method: chat.postMessage - token: ${{ secrets.SLACK_BOT_TOKEN }} - payload: | - { - "channel": "#ingest-notifications", - "text": "${{ env.SLACK_MESSAGE }}", - "blocks": [ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "${{ env.SLACK_MESSAGE }}" - } - } - ] - } - env: - SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on " - \ No newline at end of file diff --git a/.github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml b/.github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml index 4827ba5d0339..9be8cce4498c 100644 --- a/.github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml +++ b/.github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml @@ -26,6 +26,7 @@ scms: token: '{{ requiredEnv "GITHUB_TOKEN" }}' branch: '{{ requiredEnv "BRANCH" }}' commitusingapi: true + force: false sources: latestVersion: diff --git a/.github/workflows/updatecli.d/bump-golang-7.17.yml b/.github/workflows/updatecli.d/bump-golang-7.17.yml index 8c1ba9b42055..9451247d176e 100644 --- a/.github/workflows/updatecli.d/bump-golang-7.17.yml +++ b/.github/workflows/updatecli.d/bump-golang-7.17.yml @@ -13,6 +13,7 @@ scms: token: '{{ requiredEnv "GITHUB_TOKEN" }}' branch: "7.17" commitusingapi: true + force: false actions: beats: diff --git a/.github/workflows/updatecli.d/bump-golang.yml b/.github/workflows/updatecli.d/bump-golang.yml index a8333daccb9f..2c36de971757 100644 --- a/.github/workflows/updatecli.d/bump-golang.yml +++ b/.github/workflows/updatecli.d/bump-golang.yml @@ -11,8 +11,9 @@ scms: user: '{{ requiredEnv "GITHUB_ACTOR" }}' username: '{{ requiredEnv "GITHUB_ACTOR" }}' token: '{{ requiredEnv "GITHUB_TOKEN" }}' - branch: main + branch: '{{ .scm.branch }}' commitusingapi: true + force: false actions: beats: diff --git a/.mergify.yml b/.mergify.yml index 0b778ecf196b..5630cc9a65e2 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -95,7 +95,7 @@ pull_request_rules: - closed - and: - label=automation - - head~=^updatecli_bump-elastic-stack + - head~=^updatecli_ - files~=^testing/environments/snapshot.*\.yml$ actions: delete_head_branch: @@ -106,7 +106,7 @@ pull_request_rules: - closed - and: - label=automation - - head~=^updatecli_bump-golang-version + - head~=^updatecli_ - files~=^\.go-version$ actions: delete_head_branch: diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 000000000000..7d99e82c35d6 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +updatecli v0.97.0 \ No newline at end of file