Skip to content

Commit

Permalink
ci(slack/docker): use github secrets (#482)
Browse files Browse the repository at this point in the history
* ci(slack): use github secrets

* ci(docker-elastic): use github secrets
  • Loading branch information
v1v authored Jun 5, 2024
1 parent 48ba20b commit 3dcfb86
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

- uses: elastic/apm-pipeline-library/.github/actions/docker-login@current
- name: Log in to the Elastic Container registry
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
registry: docker.elastic.co
secret: secret/observability-team/ci/docker-registry/prod
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}

- uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
Expand Down Expand Up @@ -95,23 +95,19 @@ jobs:
VERSION: ${{ github.ref_name }}

- if: ${{ success() }}
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-aws-lambda"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-aws-lambda"
message: |
:large_green_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* published."
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
- if: ${{ failure() }}
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-aws-lambda"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-aws-lambda"
message: |
:large_yellow_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* could not be published."
Build: (<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|here>)
9 changes: 4 additions & 5 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ jobs:
- if: always()
name: Tear down
run: make smoketest/all/cleanup TEST_DIR=./tf

- if: always()
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current
uses: elastic/oblt-actions/slack/notify-[email protected]
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
slackChannel: "#apm-aws-lambda"
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-aws-lambda"

0 comments on commit 3dcfb86

Please sign in to comment.