-
Notifications
You must be signed in to change notification settings - Fork 260
updatecli: automate the Ironbank bumps #5367
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ff721b7
updatecli: unrequired since it's duplicated
v1v 80e3d3e
refactor: use scm values and a new location
v1v efa7ebf
updatecli: bump ironbank UBI
v1v 4e1bfcd
cherry-pick https://github.com/elastic/elastic-agent/pull/4636
v1v 3195a78
Apply suggestions from code review
v1v 81b6e53
Merge branch 'main' into feature/use-updatecli-policies
v1v 59a9948
bump version
v1v d079230
ubi is not anymore available in #5338
v1v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| config: | ||
| - path: dev-tools/packaging/templates/ironbank | ||
| dockerfile: Dockerfile.tmpl | ||
| manifest: hardening_manifest.yaml.tmpl | ||
| packages: dev-tools/packaging/packages.yml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| scm: | ||
| enabled: true | ||
| owner: elastic | ||
| repository: elastic-agent | ||
| branch: main | ||
| # begin updatecli-compose policy values | ||
| user: 'github-actions[bot]' | ||
| email: '41898282+github-actions[bot]@users.noreply.github.com' | ||
| commitusingapi: true | ||
| # end updatecli-compose policy values | ||
|
|
||
| # This will be moved to the scm section in the future and use | ||
| # commitusingapi instead. | ||
| signedcommit: true | ||
|
v1v marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| spec: | ||
| files: | ||
| - "updatecli-compose.yaml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| name: updatecli-compose | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 6 * * *' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| compose: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| packages: read | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - uses: elastic/oblt-actions/updatecli/run@v1 | ||
| with: | ||
| command: --experimental compose diff | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - uses: elastic/oblt-actions/updatecli/run@v1 | ||
| with: | ||
| command: --experimental compose apply | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - if: ${{ failure() }} | ||
| uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0 | ||
| with: | ||
| channel-id: '#ingest-notifications' | ||
| payload: | | ||
| { | ||
| "text": "${{ env.SLACK_MESSAGE }}", | ||
| "blocks": [ | ||
| { | ||
| "type": "section", | ||
| "text": { | ||
| "type": "mrkdwn", | ||
| "text": "${{ env.SLACK_MESSAGE }}" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| env: | ||
| SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
| SLACK_MESSAGE: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@agent-team` please look what's going on <${{ env.JOB_URL }}|here>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Config file for `updatecli compose ...`. | ||
| # https://www.updatecli.io/docs/core/compose/ | ||
| policies: | ||
| - name: Handle ironbank bumps | ||
| policy: ghcr.io/elastic/oblt-updatecli-policies/ironbank/templates:0.1.0@sha256:327ee971e3a974edc943f7f628145a47b202972f48e45c2054fddcd29f96a50a | ||
|
v1v marked this conversation as resolved.
Outdated
|
||
| values: | ||
| - .ci/updatecli/values.d/scm.yml | ||
| - .ci/updatecli/values.d/ironbank.yml | ||
|
|
||
| - name: Update Updatecli policies | ||
| policy: ghcr.io/updatecli/policies/autodiscovery/updatecli:0.4.0@sha256:254367f5b1454fd6032b88b314450cd3b6d5e8d5b6c953eb242a6464105eb869 | ||
| values: | ||
| - .ci/updatecli/values.d/scm.yml | ||
| - .ci/updatecli/values.d/updatecli-compose.yml | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.