Skip to content

Commit

Permalink
[E2E] - Diagnostic Bucket (#984)
Browse files Browse the repository at this point in the history
Using the Github run number instead of the run id as it's easier to match the fail to the logs
  • Loading branch information
gambol99 authored Aug 25, 2023
1 parent 3622fbf commit 69272c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/check-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ EOF

# run_diagnosis is called to retrieve details on the failure
run_diagnosis() {
[[ $? -ne 1 ]] && exit $?
[[ "${CI}" != "true" ]] && exit $?
[[ $? -ne 1 ]] && exit 1
[[ "${CI}" != "true" ]] && exit 1

echo "Running Diagnosis on failure"

mkdir -p /tmp/diagnostics
if kubectl cluster-info dump --namespaces terraform-system,apps --output-directory=/tmp/diagnostics >/dev/null; then
# @step: upload the files to the bucket
BUCKET="${DIAGNOSTICS}/${GITHUB_RUN_ID}"
BUCKET="${DIAGNOSTICS}/${GITHUB_RUN_NUMBER}"
if ! aws s3 cp /tmp/diagnostics "${BUCKET}" --acl private --recursive >/dev/null; then
echo "Failed to copy all the diagnostics"
exit 1
Expand Down

0 comments on commit 69272c7

Please sign in to comment.