Skip to content

Commit

Permalink
updatecli: move to the .github folder and support for signed commits (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed May 15, 2024
1 parent 86ef638 commit 46de7e0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 36 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/bump-elastic-stack-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
permissions:
contents: read

env:
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

jobs:
filter:
runs-on: ubuntu-latest
Expand All @@ -29,14 +26,16 @@ jobs:
fail-fast: false
matrix: ${{ fromJson(needs.filter.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-elastic-stack-snapshot.yml
pipeline: .github/workflows/updatecli.d/bump-elastic-stack-snapshot.yml
values: .github/workflows/updatecli.d/scm.yml
command: '--experimental apply'
notifySlackChannel: "#ingest-notifications"
messageIfFailure: ":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 <${{ env.JOB_URL }}|here>"
env:
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,35 @@ on:
permissions:
contents: read

env:
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

jobs:
bump-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-golang.yml
pipeline: .github/workflows/updatecli.d/bump-golang.yml
values: .github/workflows/updatecli.d/scm.yml
command: '--experimental apply'
notifySlackChannel: "#ingest-notifications"
messageIfFailure: ":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 <${{ env.JOB_URL }}|here>"

bump-7-17:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-golang-7.17.yml
pipeline: .github/workflows/updatecli.d/bump-golang-7.17.yml
values: .github/workflows/updatecli.d/scm.yml
command: '--experimental apply'
notifySlackChannel: "#ingest-notifications"
messageIfFailure: ":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 <${{ env.JOB_URL }}|here>"
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,25 @@ actions:
default:
title: '[updatecli] update elastic stack version for testing {{ source "latestVersion" }}'
kind: github/pullrequest
scmid: default
spec:
labels:
- automation
- dependency
- backport-skip
- build-monitoring
- Team:Beats-On-Call
description: |
Generated automatically with {{ requiredEnv "JOB_URL" }}
scmid: default

scms:
default:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
owner: elastic
repository: beats
owner: '{{ .scm.owner }}'
repository: '{{ .scm.repository }}'
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: '{{ requiredEnv "BRANCH" }}'
commitusingapi: true

sources:
latestVersion:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ scms:
githubConfig:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
owner: elastic
repository: beats
owner: '{{ .scm.owner }}'
repository: '{{ .scm.repository }}'
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: "7.17"
commitusingapi: true

actions:
beats:
Expand All @@ -21,12 +20,9 @@ actions:
sourceid: latestGoVersion
title: '[Automation][7.17] Bump Golang version to {{ source "latestGoVersion" }}'
spec:
automerge: false
labels:
- dependencies
- backport-skip
description: |
Generated automatically with {{ requiredEnv "JOB_URL" }}

sources:
minor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ scms:
githubConfig:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
owner: elastic
repository: beats
owner: '{{ .scm.owner }}'
repository: '{{ .scm.repository }}'
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
branch: main
commitusingapi: true

actions:
beats:
Expand All @@ -21,12 +20,9 @@ actions:
sourceid: latestGoVersion
title: '[Automation] Bump Golang version to {{ source "latestGoVersion" }}'
spec:
automerge: false
labels:
- dependencies
- backport-skip
description: |
Generated automatically with {{ requiredEnv "JOB_URL" }}

sources:
minor:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/updatecli.d/scm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
scm:
owner: elastic
repository: beats

0 comments on commit 46de7e0

Please sign in to comment.