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

feat(buildkite/slack): use github secrets #1161

Merged
merged 5 commits into from
Jun 5, 2024
Merged
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
50 changes: 27 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
- uses: elastic/oblt-actions/slack/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: "#apm-agent-php"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-agent-php"
message: |
:runner: [${{ github.repository }}] Release *${{ github.ref_name }}* has been triggered : (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here> for further details)

Expand Down Expand Up @@ -88,23 +86,31 @@ jobs:
destination: "${{ env.BUCKET_NAME }}/${{ github.run_id }}"
predefinedAcl: "publicRead"

- id: buildkite
- id: buildkite-run
if: startsWith(github.ref, 'refs/tags')
name: Run buildkite pipeline
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 }}
token: ${{ secrets.BUILDKITE_TOKEN }}
pipeline: observability-robots-php-release
triggerMessage: "${{ github.repository }}@${{ github.ref_name }} - sign artifacts"
waitFor: true
printBuildLogs: true
artifactName: signed-artifacts
artifactPath: "signed-artifacts.zip"
buildEnvVars: |
wait-for: true
env-vars: |
BUNDLE_URL=https://storage.googleapis.com/${{ env.BUCKET_NAME }}/${{ steps.upload-file.outputs.uploaded }}

- uses: elastic/oblt-actions/buildkite/[email protected]
with:
build-number: ${{ steps.buildkite-run.outputs.number }}
path: signed-artifacts.zip
pipeline: ${{ steps.buildkite-run.outputs.pipeline }}
token: ${{ secrets.BUILDKITE_TOKEN }}

# this artifact name is used also in some other places,
# such as ./.github/workflows/test-packages.yml.
# Therefore v4 cannot be used at the moment.
- uses: actions/upload-artifact@v3
with:
name: signed-artifacts
path: signed-artifacts.zip

generate-test-packages-matrix:
if: startsWith(github.ref, 'refs/tags')
uses: ./.github/workflows/generate-matrix.yml
Expand Down Expand Up @@ -173,12 +179,10 @@ jobs:
uses: elastic/apm-pipeline-library/.github/actions/check-dependent-jobs@current
with:
needs: ${{ toJSON(needs) }}
- uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
if: startsWith(github.ref, 'refs/tags')
- if: startsWith(github.ref, 'refs/tags')
uses: elastic/oblt-actions/slack/[email protected]
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-agent-php"
status: ${{ steps.check.outputs.status }}
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
slackChannel: "#apm-agent-php"
message: "[${{ github.repository }}] Release (<${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>)"
Loading