Skip to content

Commit f629b1e

Browse files
authored
github-action: run buildkite action with GH secrets (#259)
1 parent 59992e8 commit f629b1e

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed

.github/workflows/release-step-3.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,24 @@ jobs:
7373
env:
7474
TARBALL_FILE: artifacts.tar
7575
steps:
76-
- id: buildkite
76+
- id: buildkite-run
7777
name: Run Release
78-
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
78+
uses: elastic/oblt-actions/buildkite/[email protected]
7979
with:
80-
vaultUrl: ${{ secrets.VAULT_ADDR }}
81-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
82-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
8380
pipeline: ecs-logging-java-release
84-
artifactName: releases
85-
artifactPath: ${{ env.TARBALL_FILE }}
86-
waitFor: true
87-
printBuildLogs: false
88-
buildEnvVars: |
81+
token: ${{ secrets.BUILDKITE_TOKEN }}
82+
wait-for: true
83+
env-vars: |
8984
ref=${{ inputs.ref }}
9085
dry_run=${{ inputs.dry_run || 'false' }}
9186
TARBALL_FILE=${{ env.TARBALL_FILE }}
9287
93-
- uses: actions/download-artifact@v3
88+
- uses: elastic/oblt-actions/buildkite/download-artifact@v1.5.0
9489
with:
95-
name: releases
90+
build-number: ${{ steps.buildkite-run.outputs.number }}
91+
path: ${{ env.TARBALL_FILE }}
92+
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
93+
token: ${{ secrets.BUILDKITE_TOKEN }}
9694

9795
- name: untar the buildkite tarball
9896
run: tar xvf ${{ env.TARBALL_FILE }}
@@ -103,15 +101,15 @@ jobs:
103101
subject-path: "${{ github.workspace }}/**/target/*.jar"
104102

105103
- if: ${{ success() }}
106-
uses: elastic/oblt-actions/slack/send@v1.2.0
104+
uses: elastic/oblt-actions/slack/send@v1.5.0
107105
with:
108106
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
109107
channel-id: "#apm-agent-java"
110108
message: |
111-
:runner: [${{ github.repository }}] Release *${{ github.ref_name }}* has been triggered in Buildkite: (<${{ steps.buildkite.outputs.build }}|build>)
109+
:runner: [${{ github.repository }}] Release *${{ github.ref_name }}* has been triggered in Buildkite: (<${{ steps.buildkite-run.outputs.build }}|build>)
112110
113111
- if: ${{ failure() }}
114-
uses: elastic/oblt-actions/slack/send@v1.2.0
112+
uses: elastic/oblt-actions/slack/send@v1.5.0
115113
with:
116114
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
117115
channel-id: "#apm-agent-java"

.github/workflows/snapshot.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,23 @@ jobs:
4444
env:
4545
TARBALL_FILE: artifacts.tar
4646
steps:
47-
- id: buildkite
47+
- id: buildkite-run
4848
name: Run Deploy
49-
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
49+
uses: elastic/oblt-actions/buildkite/[email protected]
5050
with:
51-
vaultUrl: ${{ secrets.VAULT_ADDR }}
52-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
53-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
5451
pipeline: ecs-logging-java-snapshot
55-
artifactName: snapshots
56-
artifactPath: ${{ env.TARBALL_FILE }}
57-
waitFor: true
58-
printBuildLogs: false
59-
buildEnvVars: |
52+
token: ${{ secrets.BUILDKITE_TOKEN }}
53+
wait-for: true
54+
env-vars: |
6055
dry_run=${{ inputs.dry_run || 'false' }}
6156
TARBALL_FILE=${{ env.TARBALL_FILE }}
6257
63-
- uses: actions/download-artifact@v3
58+
- uses: elastic/oblt-actions/buildkite/download-artifact@v1.5.0
6459
with:
65-
name: snapshots
60+
build-number: ${{ steps.buildkite-run.outputs.number }}
61+
path: ${{ env.TARBALL_FILE }}
62+
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
63+
token: ${{ secrets.BUILDKITE_TOKEN }}
6664

6765
- name: untar the buildkite tarball
6866
run: tar xvf ${{ env.TARBALL_FILE }}
@@ -73,7 +71,7 @@ jobs:
7371
subject-path: "${{ github.workspace }}/**/target/*.jar"
7472

7573
- if: ${{ failure() }}
76-
uses: elastic/oblt-actions/slack/send@v1.2.0
74+
uses: elastic/oblt-actions/slack/send@v1.5.0
7775
with:
7876
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
7977
channel-id: "#apm-agent-java"

0 commit comments

Comments
 (0)