Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
release: set GH_TOKEN, add debug traces and notify if failures (#2480)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Dec 21, 2023
1 parent 82f4c4f commit 8cdff2c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .ci/generate-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#
set -eo pipefail

if [ -n "$RUNNER_DEBUG" ] ; then
set -x
fi

###############
### FUNCTIONS
Expand Down Expand Up @@ -172,7 +175,7 @@ cd releases
echo "next_patch_8=$next_patch_8"
echo "edge_8=$edge_8"
echo "generated=https://github.com/elastic/apm-pipeline-library/actions/workflows/generate-elastic-stack-releases.yml"
} > releases.properties
} | tee releases.properties

### Generate the files for the current releases
CURRENT_FOLDER=releases/current
Expand Down Expand Up @@ -212,3 +215,9 @@ if [ "$(isAvailable "$edge_8")" = "true" ] ; then
# NOTE: when 9.x happens then `main` will point to 9.
echo "$edge_8" > "$EDGE_FOLDER/main"
fi

## 3. debug
if command -v tree ; then
echo "The below files have been generated"
tree .
fi
12 changes: 11 additions & 1 deletion .github/workflows/generate-elastic-stack-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
secretId: ${{ secrets.VAULT_SECRET_ID }}

- run: .ci/generate-releases.sh
env:
GH_TOKEN: ${{ github.token }}

- name: 'Get service account'
uses: hashicorp/vault-action@v2.7.4
Expand All @@ -45,7 +47,6 @@ jobs:
uses: 'google-github-actions/upload-cloud-storage@v2'
with:
path: releases
glob: "**/*.json"
destination: "artifacts-api"
parent: false
headers: |-
Expand All @@ -54,3 +55,12 @@ jobs:
- name: debug
run: echo "${{ steps.upload-file.outputs.uploaded }}"

- if: ${{ failure() }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: '#observablt-bots'
message: ":traffic_cone: generate-elastic-stack-releases 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 comments on commit 8cdff2c

Please sign in to comment.