Skip to content

Commit 0b1aace

Browse files
authored
github-actions: run buildkite using GitHub secrets (#327)
1 parent 6682db9 commit 0b1aace

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,26 @@ jobs:
7171
env:
7272
TARBALL_FILE: dist.tar
7373
steps:
74-
- id: buildkite
74+
- id: buildkite-run
7575
name: Run Release dry-run
76-
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
76+
uses: elastic/oblt-actions/buildkite/[email protected]
7777
with:
78-
vaultUrl: ${{ secrets.VAULT_ADDR }}
79-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
80-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
81-
pipeline: apm-agent-android-release
82-
pipelineBranch: ${{ github.ref_name }}
83-
waitFor: true
84-
printBuildLogs: false
85-
artifactName: signed-artifacts
86-
artifactPath: ${{ env.TARBALL_FILE }}
87-
buildEnvVars: |
78+
branch: ${{ github.ref_name }}
79+
pipeline: "apm-agent-android-release"
80+
token: ${{ secrets.BUILDKITE_TOKEN }}
81+
wait-for: true
82+
env-vars: |
8883
branch_specifier=${{ github.ref_name }}
8984
target_specifier=all
9085
dry_run=true
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: signed-artifacts
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 }}

.github/workflows/release.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,27 @@ jobs:
5757
:runner: [${{ github.repository }}] Release *${{ github.ref_name }}* has been triggered with the following params:
5858
```${{ toJSON(github.event.inputs) }}```
5959
60-
- id: buildkite
60+
- id: buildkite-run
6161
name: Run Release
62-
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
62+
uses: elastic/oblt-actions/buildkite/[email protected]
6363
with:
64-
vaultUrl: ${{ secrets.VAULT_ADDR }}
65-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
66-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
67-
pipeline: apm-agent-android-release
68-
pipelineBranch: ${{ github.ref_name }}
69-
waitFor: true
70-
printBuildLogs: false
71-
artifactName: signed-artifacts
72-
artifactPath: ${{ env.TARBALL_FILE }}
73-
buildEnvVars: |
64+
branch: ${{ github.ref_name }}
65+
pipeline: "apm-agent-android-release"
66+
token: ${{ secrets.BUILDKITE_TOKEN }}
67+
wait-for: true
68+
env-vars: |
7469
branch_specifier=${{ inputs.branch_specifier || 'main' }}
7570
target_specifier=${{ inputs.target_specifier || 'all' }}
7671
version_override_specifier=${{ inputs.version_override_specifier || '' }}
7772
dry_run=${{ inputs.dry_run || 'false' }}
7873
TARBALL_FILE=${{ env.TARBALL_FILE }}
7974
80-
- uses: actions/download-artifact@v3
75+
- uses: elastic/oblt-actions/buildkite/download-artifact@v1.5.0
8176
with:
82-
name: signed-artifacts
77+
build-number: ${{ steps.buildkite-run.outputs.number }}
78+
path: ${{ env.TARBALL_FILE }}
79+
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
80+
token: ${{ secrets.BUILDKITE_TOKEN }}
8381

8482
- name: untar the buildkite tarball
8583
run: tar xvf ${{ env.TARBALL_FILE }}
@@ -100,7 +98,7 @@ jobs:
10098
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
10199
channel-id: "#apm-agent-mobile"
102100
message: |
103-
:tada: :rocket: [${{ github.repository }}] Release *${{ github.ref_name }}* has been successful in Buildkite: (<${{ steps.buildkite.outputs.build }}|build>)
101+
:tada: :rocket: [${{ github.repository }}] Release *${{ github.ref_name }}* has been successful in Buildkite: (<${{ steps.buildkite-run.outputs.build }}|build>)
104102
105103
- if: ${{ failure() }}
106104
uses: elastic/oblt-actions/slack/[email protected]

0 commit comments

Comments
 (0)