-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updatecli: use updatecli policies (#13934)
(cherry picked from commit 3351902) # Conflicts: # .github/workflows/bump-golang.yml
- Loading branch information
1 parent
fdb0df8
commit 1b00eec
Showing
11 changed files
with
123 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,2 @@ | ||
config: | ||
- path: packaging/ironbank |
This file contains 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: apm-server | ||
branch: main | ||
# begin updatecli-compose policy values | ||
user: obltmachine | ||
email: [email protected] | ||
commitusingapi: true | ||
# end updatecli-compose policy values | ||
|
||
# This will be moved to the scm section in the future and use | ||
# commitusingapi instead. | ||
signedcommit: true |
This file contains 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 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 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 |
---|---|---|
|
@@ -16,14 +16,43 @@ jobs: | |
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: elastic/oblt-actions/updatecli/run@v1.9.1 | ||
- uses: elastic/oblt-actions/updatecli/run@v1 | ||
with: | ||
command: --experimental apply --config .ci/bump-golang.yml | ||
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} | ||
|
||
<<<<<<< HEAD | ||
- if: ${{ failure() }} | ||
uses: elastic/oblt-actions/slack/[email protected] | ||
======= | ||
bump-7: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: '7.17' | ||
|
||
- uses: elastic/oblt-actions/updatecli/run@v1 | ||
with: | ||
command: --experimental apply --config .ci/updatecli/bump-golang.yml --values .ci/updatecli/values.d/scm.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} | ||
GITHUB_BRANCH: '7.17' | ||
GITHUB_LABELS: 'backport-skip' | ||
|
||
notify: | ||
runs-on: ubuntu-latest | ||
needs: [bump, bump-7] | ||
if: always() | ||
steps: | ||
- id: check | ||
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current | ||
with: | ||
needs: ${{ toJSON(needs) }} | ||
- if: ${{ steps.check.outputs.isSuccess == 'false' }} | ||
uses: elastic/oblt-actions/slack/send@v1 | ||
>>>>>>> 3351902f8 (updatecli: use updatecli policies (#13934)) | ||
with: | ||
bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
channel-id: "#apm-server" | ||
|
This file contains 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 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,44 @@ | ||
--- | ||
name: update-compose | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 6 * * *' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
compose: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: read | ||
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.UPDATECLI_GH_TOKEN }} | ||
|
||
- uses: elastic/oblt-actions/updatecli/run@v1 | ||
with: | ||
command: --experimental compose apply | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }} | ||
|
||
- if: ${{ failure() }} | ||
uses: elastic/oblt-actions/slack/send@v1 | ||
with: | ||
channel-id: '#apm-server' | ||
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>" | ||
bot-token: ${{ secrets.SLACK_BOT_TOKEN }} |
This file contains 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.0.2@sha256:327ee971e3a974edc943f7f628145a47b202972f48e45c2054fddcd29f96a50a | ||
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 |