diff --git a/.github/workflows/bump-beats-version.yml b/.github/workflows/bump-beats-version.yml new file mode 100644 index 00000000000..0c0607bf660 --- /dev/null +++ b/.github/workflows/bump-beats-version.yml @@ -0,0 +1,69 @@ +name: update-beats + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 1-5' + +permissions: + contents: read + +env: + JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + +jobs: + filter: + runs-on: ubuntu-latest + timeout-minutes: 1 + outputs: + matrix: ${{ steps.generator.outputs.matrix }} + permissions: + contents: read + steps: + - id: generator + uses: elastic/oblt-actions/elastic/active-branches@v1 + with: + exclude-branches: "7.17,8.17,8.18,9.0" + filter-branches: true + + update-beats: + permissions: + contents: write + pull-requests: write + needs: + - filter + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: ${{ fromJson(needs.filter.outputs.matrix) }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ matrix.branch }} + + - 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-beats.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-golang.yml b/.github/workflows/bump-golang.yml index 886caf940cf..452cb73dd13 100644 --- a/.github/workflows/bump-golang.yml +++ b/.github/workflows/bump-golang.yml @@ -21,32 +21,16 @@ jobs: steps: - uses: actions/checkout@v4 - - 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 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: ${{ failure() }} - uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0 + uses: elastic/oblt-actions/slack/send@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 }}" - } - } - ] - } - 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..df1a574f4f6 100644 --- a/.github/workflows/updatecli-compose.yml +++ b/.github/workflows/updatecli-compose.yml @@ -28,33 +28,22 @@ 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() }} - 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 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