Skip to content

Commit

Permalink
github-actions: run buildkite using GitHub secrets (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 5, 2024
1 parent 6682db9 commit 0b1aace
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,26 @@ jobs:
env:
TARBALL_FILE: dist.tar
steps:
- id: buildkite
- id: buildkite-run
name: Run Release dry-run
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
uses: elastic/oblt-actions/buildkite/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: apm-agent-android-release
pipelineBranch: ${{ github.ref_name }}
waitFor: true
printBuildLogs: false
artifactName: signed-artifacts
artifactPath: ${{ env.TARBALL_FILE }}
buildEnvVars: |
branch: ${{ github.ref_name }}
pipeline: "apm-agent-android-release"
token: ${{ secrets.BUILDKITE_TOKEN }}
wait-for: true
env-vars: |
branch_specifier=${{ github.ref_name }}
target_specifier=all
dry_run=true
TARBALL_FILE=${{ env.TARBALL_FILE }}
- uses: actions/download-artifact@v3
- uses: elastic/oblt-actions/buildkite/download-artifact@v1.5.0
with:
name: signed-artifacts
build-number: ${{ steps.buildkite-run.outputs.number }}
path: ${{ env.TARBALL_FILE }}
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
token: ${{ secrets.BUILDKITE_TOKEN }}

- name: untar the buildkite tarball
run: tar xvf ${{ env.TARBALL_FILE }}
Expand Down
28 changes: 13 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,29 +57,27 @@ jobs:
:runner: [${{ github.repository }}] Release *${{ github.ref_name }}* has been triggered with the following params:
```${{ toJSON(github.event.inputs) }}```
- id: buildkite
- id: buildkite-run
name: Run Release
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
uses: elastic/oblt-actions/buildkite/[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: apm-agent-android-release
pipelineBranch: ${{ github.ref_name }}
waitFor: true
printBuildLogs: false
artifactName: signed-artifacts
artifactPath: ${{ env.TARBALL_FILE }}
buildEnvVars: |
branch: ${{ github.ref_name }}
pipeline: "apm-agent-android-release"
token: ${{ secrets.BUILDKITE_TOKEN }}
wait-for: true
env-vars: |
branch_specifier=${{ inputs.branch_specifier || 'main' }}
target_specifier=${{ inputs.target_specifier || 'all' }}
version_override_specifier=${{ inputs.version_override_specifier || '' }}
dry_run=${{ inputs.dry_run || 'false' }}
TARBALL_FILE=${{ env.TARBALL_FILE }}
- uses: actions/download-artifact@v3
- uses: elastic/oblt-actions/buildkite/download-artifact@v1.5.0
with:
name: signed-artifacts
build-number: ${{ steps.buildkite-run.outputs.number }}
path: ${{ env.TARBALL_FILE }}
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
token: ${{ secrets.BUILDKITE_TOKEN }}

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

0 comments on commit 0b1aace

Please sign in to comment.