From 2ff4a178230c0123eb7c71f8fb7df9170fd62398 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 21 Jul 2025 13:20:36 +0200 Subject: [PATCH 1/2] deps: use the latest updatecli version and use oblt-actions (#9082) (cherry picked from commit 58886e60cd88e35fa5c25706c642630b891db3c5) # Conflicts: # .github/workflows/bump-golang.yml # .github/workflows/bump-otel-version.yml # .github/workflows/updatecli-compose.yml --- .github/workflows/bump-beats-version.yml | 1 + .github/workflows/bump-golang.yml | 32 +++++++-------- .github/workflows/bump-otel-version.yml | 52 ++++++++++++++++++++++++ .github/workflows/bump-vm-images.yml | 1 + .github/workflows/updatecli-compose.yml | 12 +++++- .updatecli-version | 1 + 6 files changed, 80 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/bump-otel-version.yml create mode 100644 .updatecli-version diff --git a/.github/workflows/bump-beats-version.yml b/.github/workflows/bump-beats-version.yml index 5fb4a12177a..0c0607bf660 100644 --- a/.github/workflows/bump-beats-version.yml +++ b/.github/workflows/bump-beats-version.yml @@ -56,6 +56,7 @@ jobs: uses: elastic/oblt-actions/updatecli/run@v1 with: command: apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml + version-file: .updatecli-version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: ${{ matrix.branch }} diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index 886caf940cf..9a02b1a76ae 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -21,32 +21,28 @@ jobs: steps: - uses: actions/checkout@v4 +<<<<<<< HEAD - name: Install Updatecli in the runner uses: updatecli/updatecli-action@f11c0cb3aca7a018d6000dc86a57eb3442277219 # 2.81.0 - name: Run Updatecli in Apply mode run: updatecli apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml +======= + - uses: elastic/oblt-actions/updatecli/run@v1 + with: + command: apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml + version-file: .updatecli-version +>>>>>>> 58886e60c (deps: use the latest updatecli version and use oblt-actions (#9082)) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} +<<<<<<< HEAD uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 +======= + uses: elastic/oblt-actions/slack/send@v1 +>>>>>>> 58886e60c (deps: use the latest updatecli version and use oblt-actions (#9082)) 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 }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>" + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: "#ingest-notifications" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>" diff --git a/.github/workflows/bump-otel-version.yml b/.github/workflows/bump-otel-version.yml new file mode 100644 index 00000000000..12aee4a9fda --- /dev/null +++ b/.github/workflows/bump-otel-version.yml @@ -0,0 +1,52 @@ +name: bump-otel-version + +on: + workflow_dispatch: + schedule: + - cron: '24 5 * * 1-5' + +permissions: + contents: read + +env: + JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + +jobs: + update-otel: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + branch: ["main", "8.19"] + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Install mage + uses: magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0 + with: + version: v1.14.0 + install-only: true + + - name: Run Updatecli in Apply mode + uses: elastic/oblt-actions/updatecli/run@v1 + with: + command: apply --config .ci/updatecli/update-otel.yml --values .ci/updatecli/values.d/scm.yml + version-file: .updatecli-version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH_NAME: ${{ matrix.branch }} + + - if: ${{ failure() }} + uses: elastic/oblt-actions/slack/send@v1 + with: + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: "#ingest-notifications" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>" diff --git a/.github/workflows/bump-vm-images.yml b/.github/workflows/bump-vm-images.yml index 7f3b76c1b89..4ac99155982 100644 --- a/.github/workflows/bump-vm-images.yml +++ b/.github/workflows/bump-vm-images.yml @@ -45,6 +45,7 @@ jobs: - uses: elastic/oblt-actions/updatecli/run@v1 with: command: apply --config .ci/updatecli/updatecli-bump-vm-images.yml --values .ci/updatecli/values.d/scm.yml + version-file: .updatecli-version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH_NAME: ${{ matrix.branch }} diff --git a/.github/workflows/updatecli-compose.yml b/.github/workflows/updatecli-compose.yml index 6c4e05b5536..803b42b19d5 100644 --- a/.github/workflows/updatecli-compose.yml +++ b/.github/workflows/updatecli-compose.yml @@ -28,16 +28,19 @@ jobs: - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose diff + version-file: .updatecli-version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: elastic/oblt-actions/updatecli/run@v1 with: command: --experimental compose apply + version-file: .updatecli-version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} +<<<<<<< HEAD uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 with: method: chat.postMessage @@ -56,5 +59,12 @@ jobs: } ] } +======= + uses: elastic/oblt-actions/slack/send@v1 +>>>>>>> 58886e60c (deps: use the latest updatecli version and use oblt-actions (#9082)) env: - SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>" + JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + with: + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + channel-id: "#ingest-notifications" + message: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>" diff --git a/.updatecli-version b/.updatecli-version new file mode 100644 index 00000000000..5c5d5571187 --- /dev/null +++ b/.updatecli-version @@ -0,0 +1 @@ +v0.104.0 \ No newline at end of file From 2a7b23fbd3512dc25549ed5ac5d51643e24c4162 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 21 Jul 2025 13:28:04 +0200 Subject: [PATCH 2/2] merge --- .github/workflows/bump-golang.yml | 12 ------------ .github/workflows/updatecli-compose.yml | 21 --------------------- 2 files changed, 33 deletions(-) diff --git a/.github/workflows/bump-golang.yml b/.github/workflows/bump-golang.yml index 9a02b1a76ae..452cb73dd13 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -21,27 +21,15 @@ jobs: steps: - uses: actions/checkout@v4 -<<<<<<< HEAD - - name: Install Updatecli in the runner - uses: updatecli/updatecli-action@f11c0cb3aca7a018d6000dc86a57eb3442277219 # 2.81.0 - - - name: Run Updatecli in Apply mode - run: updatecli apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml -======= - uses: elastic/oblt-actions/updatecli/run@v1 with: command: apply --config .ci/updatecli/updatecli-bump-golang.yml --values .ci/updatecli/values.d/scm.yml version-file: .updatecli-version ->>>>>>> 58886e60c (deps: use the latest updatecli version and use oblt-actions (#9082)) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} -<<<<<<< HEAD - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 -======= uses: elastic/oblt-actions/slack/send@v1 ->>>>>>> 58886e60c (deps: use the latest updatecli version and use oblt-actions (#9082)) with: bot-token: ${{ secrets.SLACK_BOT_TOKEN }} channel-id: "#ingest-notifications" diff --git a/.github/workflows/updatecli-compose.yml b/.github/workflows/updatecli-compose.yml index 803b42b19d5..df1a574f4f6 100644 --- a/.github/workflows/updatecli-compose.yml +++ b/.github/workflows/updatecli-compose.yml @@ -40,28 +40,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} -<<<<<<< HEAD - 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 }}" - } - } - ] - } -======= uses: elastic/oblt-actions/slack/send@v1 ->>>>>>> 58886e60c (deps: use the latest updatecli version and use oblt-actions (#9082)) env: JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" with: