Skip to content
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

ci: use updatecli with GitHub secrets #1498

Merged
merged 3 commits into from
Jun 7, 2024
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
8 changes: 4 additions & 4 deletions .ci/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ scms:
default:
kind: github
spec:
user: '{{ requiredEnv "GIT_USER" }}'
email: '{{ requiredEnv "GIT_EMAIL" }}'
user: '{{ requiredEnv "GITHUB_ACTOR" }}'
owner: elastic
repository: apm-agent-rum-js
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
branch: main
commitusingapi: true

sources:
latestRelease:
Expand All @@ -32,7 +32,7 @@ sources:
owner: elastic
repository: elasticsearch
token: '{{ requiredEnv "GITHUB_TOKEN" }}'
username: '{{ requiredEnv "GIT_USER" }}'
username: '{{ requiredEnv "GITHUB_ACTOR" }}'
versionfilter:
kind: regex
pattern: ^v8\.(\d+)\.(\d+)$
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/bump-elastic-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ jobs:

- uses: actions/checkout@v4

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
- uses: elastic/oblt-actions/updatecli/run@v1
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-elastic-stack.yml
command: "--experimental apply --config .ci/bump-elastic-stack.yml"
env:
GITHUB_TOKEN: ${{ secrets.UPDATECLI_GH_TOKEN }}

- if: failure()
uses: elastic/oblt-actions/slack/send@v1
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-agent-js"
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>"
Loading