Skip to content

Commit dd21c84

Browse files
authored
ci: use oblt-actions (slack and buildkite) and ruby github secrets (#1460)
1 parent f4d928d commit dd21c84

File tree

2 files changed

+12
-38
lines changed

2 files changed

+12
-38
lines changed

.github/workflows/microbenchmark.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,16 @@ permissions:
1616
jobs:
1717
microbenchmark:
1818
runs-on: ubuntu-latest
19-
# wait up to 1 hour
20-
timeout-minutes: 60
19+
timeout-minutes: 5
2120
steps:
22-
- id: buildkite
23-
name: Run buildkite pipeline
24-
uses: elastic/apm-pipeline-library/.github/actions/buildkite@current
21+
- name: Run microbenchmark
22+
uses: elastic/oblt-actions/buildkite/run@v1
2523
with:
26-
vaultUrl: ${{ secrets.VAULT_ADDR }}
27-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
28-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
29-
pipeline: apm-agent-microbenchmark
30-
triggerMessage: "${{ github.repository }}@${{ github.ref_name }}"
31-
waitFor: true
32-
printBuildLogs: true
33-
buildEnvVars: |
24+
pipeline: "apm-agent-microbenchmark"
25+
token: ${{ secrets.BUILDKITE_TOKEN }}
26+
wait-for: false
27+
env-vars: |
3428
script=.ci/scripts/bench.sh
3529
repo=apm-agent-ruby
3630
sha=${{ github.sha }}
3731
BRANCH_NAME=${{ github.ref_name }}
38-
39-
- if: ${{ failure() }}
40-
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
41-
with:
42-
url: ${{ secrets.VAULT_ADDR }}
43-
roleId: ${{ secrets.VAULT_ROLE_ID }}
44-
secretId: ${{ secrets.VAULT_SECRET_ID }}
45-
channel: "#apm-agent-ruby"
46-
message: |
47-
:ghost: [${{ github.repository }}] microbenchmark *${{ github.ref_name }}* failed to run in Buildkite.
48-
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)

.github/workflows/release.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,13 @@ jobs:
2222
- uses: ruby/setup-ruby@v1
2323
with:
2424
ruby-version: 2.6
25-
- uses: hashicorp/[email protected]
26-
with:
27-
url: ${{ secrets.VAULT_ADDR }}
28-
method: approle
29-
roleId: ${{ secrets.VAULT_ROLE_ID }}
30-
secretId: ${{ secrets.VAULT_SECRET_ID }}
31-
secrets: |
32-
secret/apm-team/ci/apm-agent-ruby-rubygems-release apiKey | API_KEY ;
3325
- name: RubyGems login
3426
run: |
3527
RUBY_HOME="${HOME}/.gem"
3628
RUBY_CREDENTIALS_FILE="${RUBY_HOME}/credentials"
3729
mkdir -p "${RUBY_HOME}"
3830
echo '---' > "${RUBY_CREDENTIALS_FILE}"
39-
echo ":rubygems_api_key: ${API_KEY}" >> "${RUBY_CREDENTIALS_FILE}"
31+
echo ":rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}" >> "${RUBY_CREDENTIALS_FILE}"
4032
chmod 0600 "${RUBY_CREDENTIALS_FILE}"
4133
4234
- name: Install build system
@@ -87,9 +79,8 @@ jobs:
8779
needs: ${{ toJSON(needs) }}
8880
- run: ${{ steps.check.outputs.isSuccess }}
8981
- if: ${{ always() && startsWith(github.ref, 'refs/tags') }}
90-
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
82+
uses: elastic/oblt-actions/slack/notify-result@v1
9183
with:
92-
vaultUrl: ${{ secrets.VAULT_ADDR }}
93-
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
94-
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
95-
slackChannel: "#apm-agent-ruby"
84+
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
85+
channel-id: "#apm-agent-ruby"
86+
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>"

0 commit comments

Comments
 (0)