-
Notifications
You must be signed in to change notification settings - Fork 5k
github-actions(updatecli): use oblt-actions, pin version and avoid diverging PRs #43743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b6c7475
7d3048a
93cefb2
62e8864
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" | ||
| slack-send-when: "failure" | ||
| version-file: .tool-versions | ||
| env: | ||
| BRANCH: ${{ matrix.branch }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - if: ${{ failure() }} | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| 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 <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ scms: | |
| token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
| branch: "7.17" | ||
| commitusingapi: true | ||
| force: false | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this what would prevent the force-push that closes the PR?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, that's the alternative, already added to the description, but see this link: This solves the problem partially, as it will not create any new updates with a new version either updating the existing open PR or creating a new of if an existing open PR exists. I need to see if using an old version of updatecli, as mentioned at updatecli/updatecli#2211 (comment), reverts to the original approach (see https://github.com/elastic/beats/pull/41241/commits). |
||
|
|
||
| actions: | ||
| beats: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,9 @@ scms: | |
| user: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| username: '{{ requiredEnv "GITHUB_ACTOR" }}' | ||
| token: '{{ requiredEnv "GITHUB_TOKEN" }}' | ||
| branch: main | ||
| branch: '{{ .scm.branch }}' | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. default to main, but let's avoid being hardcoded here, so we can use the config file locally |
||
| commitusingapi: true | ||
| force: false | ||
|
|
||
| actions: | ||
| beats: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| updatecli v0.97.0 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll create a follow-up to bump this version as we do in some other places |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We maintain
elastic/oblt-actionsso we can avoid the burden of bumping versions