Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ scms:
kind: github
spec:
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: elastic
repository: apm-server
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: '{{ .scm.owner }}'
repository: '{{ .scm.repository }}'
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
branch: '{{ requiredEnv "BRANCH" }}'
commitusingapi: true
Expand Down
5 changes: 3 additions & 2 deletions .ci/bump-golang.yml → .ci/updatecli/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ scms:
kind: github
spec:
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: elastic
repository: apm-server
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: '{{ .scm.owner }}'
repository: '{{ .scm.repository }}'
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
branch: '{{ requiredEnv "GITHUB_BRANCH" }}'
commitusingapi: true
Expand Down
5 changes: 3 additions & 2 deletions .ci/update-beats.yml → .ci/updatecli/update-beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ scms:
kind: github
spec:
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: elastic
repository: apm-server
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: '{{ .scm.owner }}'
repository: '{{ .scm.repository }}'
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
branch: '{{ requiredEnv "BRANCH_NAME" }}'
commitusingapi: true
Expand Down
2 changes: 2 additions & 0 deletions .ci/updatecli/values.d/ironbank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config:
- path: packaging/ironbank
14 changes: 14 additions & 0 deletions .ci/updatecli/values.d/scm.yml
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
3 changes: 3 additions & 0 deletions .ci/updatecli/values.d/updatecli-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
spec:
files:
- "updatecli-compose.yaml"
6 changes: 3 additions & 3 deletions .github/workflows/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ jobs:
with:
ref: ${{ matrix.branch }}

- uses: elastic/oblt-actions/updatecli/run@v1.2.0
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental apply --config .ci/bump-elastic-stack-snapshot.yml
command: --experimental apply --config .ci/updatecli/bump-elastic-stack-snapshot.yml --values .ci/updatecli/values.d/scm.yml
env:
BRANCH: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1.2.0
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>"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:

- uses: actions/checkout@v4

- uses: elastic/oblt-actions/updatecli/run@v1.2.0
- 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 }}
GITHUB_BRANCH: 'main'
Expand All @@ -58,9 +58,9 @@ jobs:
with:
ref: '7.17'

- 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 }}
GITHUB_BRANCH: '7.17'
Expand All @@ -76,7 +76,7 @@ jobs:
with:
needs: ${{ toJSON(needs) }}
- if: ${{ steps.check.outputs.isSuccess == 'false' }}
uses: elastic/oblt-actions/slack/send@v1.9.1
uses: elastic/oblt-actions/slack/send@v1
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-server"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-beats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
with:
go-version-file: go.mod

- uses: elastic/oblt-actions/updatecli/run@v1.2.0
- uses: elastic/oblt-actions/updatecli/run@v1
with:
command: --experimental apply --config .ci/update-beats.yml
command: --experimental apply --config .ci/updatecli/update-beats.yml --values .ci/updatecli/values.d/scm.yml
env:
BRANCH_NAME: ${{ matrix.branch }}
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: ${{ failure() }}
uses: elastic/oblt-actions/slack/send@v1.2.0
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>"
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/update-compose.yml
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 }}
14 changes: 14 additions & 0 deletions updatecli-compose.yaml
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