Skip to content

Commit

Permalink
fix script permissions in master wf + change wf titles so that they a…
Browse files Browse the repository at this point in the history
…re not confusing when browsing github actions UI + add condition for wfs not to run on forks + improve slack messages to handle no empty status of jobs
  • Loading branch information
aalves08 committed Dec 12, 2024
1 parent 1c540a8 commit f293fd8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
Empty file modified .github/workflows/scripts/retrieve-versions.sh
100644 → 100755
Empty file.
Empty file modified .github/workflows/scripts/test-extensions-creators-build.sh
100644 → 100755
Empty file.
12 changes: 8 additions & 4 deletions .github/workflows/test-extension-workflows-master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Extension workflows
name: Test Extension workflows - Master (3.x)

on:
schedule:
Expand All @@ -11,6 +11,7 @@ defaults:

jobs:
test-extensions-creators-and-update-paths:
if: ${{ github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
outputs:
test-extensions-creators-and-update-paths-job-status: ${{ job.status }}
Expand All @@ -23,6 +24,7 @@ jobs:
id: test-extensions-and-creators
shell: bash
retrieve-tags-master:
if: ${{ github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
outputs:
SHELL_TAG: ${{ steps.retrieve-data.outputs.SHELL_TAG }}
Expand Down Expand Up @@ -100,8 +102,8 @@ jobs:
OUTPUT_ARRAY=("${{ needs.test-extensions-creators-and-update-paths-job-status.outputs.test-legacy-v1-job-status }}" "${{ needs.retrieve-tags-master.outputs.tags-job-status }}" "${{ needs.test-build-extension-charts-master.outputs.build-job-status }}" "${{ needs.test-build-extension-catalog-master.outputs.build-extension-catalog-job-status }}" "${{ needs.test-release-shell-pkg-master.outputs.build-release-shell-creators-status }}" "${{ needs.test-release-creators-pkg-master.outputs.build-release-shell-creators-status }}")
JOB_NAME_ARRAY=("test-extensions-creators-and-update-paths-job-status" "retrieve-tags-master" "test-build-extension-charts-master" "test-build-extension-catalog-master" "test-release-shell-pkg-master" "test-release-creators-pkg-master")
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ]]; then
MSG_PREFIX="\nWorkflows testing for extensions failed! 🆘"
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ] || [ ${OUTPUT_ARRAY[@]} =~ "" ]]; then
MSG_PREFIX="\nWorkflows testing for extensions failed! "
else
MSG_PREFIX="\nWorkflows testing for extensions succedded! ✅"
fi
Expand All @@ -113,7 +115,9 @@ jobs:
for index in "${!OUTPUT_ARRAY[@]}"
do
if [[ ${OUTPUT_ARRAY[$index]} == "failure" ]]; then
EMOJI="🆘"
EMOJI="❌"
elif [[ ${OUTPUT_ARRAY[$index]} == "" ]]; then
EMOJI="NO JOB STATUS! ⭕"
else
EMOJI="✅"
fi
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test-extension-workflows-release-2.8.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Extension workflows
name: Test Extension workflows - Release 2.8 (1.x)

on:
schedule:
Expand All @@ -11,6 +11,7 @@ defaults:

jobs:
retrieve-tags-release-2-dot-8:
if: ${{ github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
outputs:
SHELL_TAG: ${{ steps.retrieve-data.outputs.SHELL_TAG }}
Expand Down Expand Up @@ -88,8 +89,8 @@ jobs:
OUTPUT_ARRAY=("${{ needs.retrieve-tags-release-2-dot-8.outputs.tags-job-status }}" "${{ needs.test-build-extension-charts-release-2-dot-8.outputs.build-job-status }}" "${{ needs.test-build-extension-catalog-release-2-dot-8.outputs.build-extension-catalog-job-status }}" "${{ needs.test-release-shell-pkg-release-2-dot-8.outputs.build-release-shell-creators-status }}" "${{ needs.test-release-creators-pkg-release-2-dot-8.outputs.build-release-shell-creators-status }}")
JOB_NAME_ARRAY=("retrieve-tags-release-2-dot-8" "test-build-extension-charts-release-2-dot-8" "test-build-extension-catalog-release-2-dot-8" "test-release-shell-pkg-release-2-dot-8" "test-release-creators-pkg-release-2-dot-8")
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ]]; then
MSG_PREFIX="\nWorkflows testing for extensions failed! 🆘"
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ] || [ ${OUTPUT_ARRAY[@]} =~ "" ]]; then
MSG_PREFIX="\nWorkflows testing for extensions failed! "
else
MSG_PREFIX="\nWorkflows testing for extensions succedded! ✅"
fi
Expand All @@ -101,7 +102,9 @@ jobs:
for index in "${!OUTPUT_ARRAY[@]}"
do
if [[ ${OUTPUT_ARRAY[$index]} == "failure" ]]; then
EMOJI="🆘"
EMOJI="❌"
elif [[ ${OUTPUT_ARRAY[$index]} == "" ]]; then
EMOJI="NO JOB STATUS! ⭕"
else
EMOJI="✅"
fi
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/test-extension-workflows-release-2.9.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test Extension workflows
name: Test Extension workflows - Release 2.9 (2.x)

on:
schedule:
Expand All @@ -11,6 +11,7 @@ defaults:

jobs:
retrieve-tags-release-2-dot-9:
if: ${{ github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
outputs:
SHELL_TAG: ${{ steps.retrieve-data.outputs.SHELL_TAG }}
Expand Down Expand Up @@ -88,8 +89,8 @@ jobs:
OUTPUT_ARRAY=("${{ needs.retrieve-tags-release-2-dot-9.outputs.tags-job-status }}" "${{ needs.test-build-extension-charts-release-2-dot-9.outputs.build-job-status }}" "${{ needs.test-build-extension-catalog-release-2-dot-9.outputs.build-extension-catalog-job-status }}" "${{ needs.test-release-shell-pkg-release-2-dot-9.outputs.build-release-shell-creators-status }}" "${{ needs.test-release-creators-pkg-release-2-dot-9.outputs.build-release-shell-creators-status }}")
JOB_NAME_ARRAY=("retrieve-tags-release-2-dot-9" "test-build-extension-charts-release-2-dot-9" "test-build-extension-catalog-release-2-dot-9" "test-release-shell-pkg-release-2-dot-9" "test-release-creators-pkg-release-2-dot-9")
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ]]; then
MSG_PREFIX="\nWorkflows testing for extensions failed! 🆘"
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ] || [ ${OUTPUT_ARRAY[@]} =~ "" ]]; then
MSG_PREFIX="\nWorkflows testing for extensions failed! "
else
MSG_PREFIX="\nWorkflows testing for extensions succedded! ✅"
fi
Expand All @@ -101,7 +102,9 @@ jobs:
for index in "${!OUTPUT_ARRAY[@]}"
do
if [[ ${OUTPUT_ARRAY[$index]} == "failure" ]]; then
EMOJI="🆘"
EMOJI="❌"
elif [[ ${OUTPUT_ARRAY[$index]} == "" ]]; then
EMOJI="NO JOB STATUS! ⭕"
else
EMOJI="✅"
fi
Expand Down

0 comments on commit f293fd8

Please sign in to comment.