Skip to content

Commit

Permalink
Fix slack outputs (#12820)
Browse files Browse the repository at this point in the history
* update

* delete file that shouldnt be there

* fix slack outputs on other extensions wf tests + change update script from sh to bash + bump creators version
  • Loading branch information
aalves08 authored Dec 5, 2024
1 parent 51c568e commit ef76fec
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 30 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/test-extension-workflows-release-2.8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,27 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL_EXT_WFS }}
run: |
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="Workflows testing for extensions failed! 🆘"
MSG_PREFIX="\nWorkflows testing for extensions failed! 🆘"
else
MSG_PREFIX="Workflows testing for extensions succedded! ✅"
MSG_PREFIX="\nWorkflows testing for extensions succedded! ✅"
fi
echo "message prefix ::: $MSG_PREFIX"
TAGS_OUTPUT_STRING="status for retrieve-tags-release-2-dot-8 - build => ${{ needs.retrieve-tags-release-2-dot-8.outputs.tags-job-status }}"
EXT_CHART_BUILD_OUTPUT_STRING="status for test-build-extension-charts-release-2-dot-8 - build => ${{ needs.test-build-extension-charts-release-2-dot-8.outputs.build-job-status }}"
EXT_CATALOG_BUILD_OUTPUT_STRING="status for test-build-extension-catalog-release-2-dot-8 - build => ${{ needs.test-build-extension-catalog-release-2-dot-8.outputs.build-extension-catalog-job-status }}"
RELEASE_SHELL_PKG_OUTPUT_STRING="status for test-release-shell-pkg-release-2-dot-8 - release => ${{ needs.test-release-shell-pkg-release-2-dot-8.outputs.build-release-shell-creators-status }}"
RELEASE_CREATORS_PKG_OUTPUT_STRING="status for test-release-creators-pkg-release-2-dot-8 - release => ${{ needs.test-release-creators-pkg-release-2-dot-8.outputs.build-release-shell-creators-status }}"
MSG="$MSG_PREFIX"
echo $TAGS_OUTPUT_STRING
echo $EXT_CHART_BUILD_OUTPUT_STRING
echo $EXT_CATALOG_BUILD_OUTPUT_STRING
echo $RELEASE_SHELL_PKG_OUTPUT_STRING
echo $RELEASE_CREATORS_PKG_OUTPUT_STRING
MSG="$MSG_PREFIX ::: $TAGS_OUTPUT_STRING ::: $EXT_CHART_BUILD_OUTPUT_STRING ::: $EXT_CATALOG_BUILD_OUTPUT_STRING ::: $RELEASE_SHELL_PKG_OUTPUT_STRING ::: $RELEASE_CREATORS_PKG_OUTPUT_STRING"
for index in "${!OUTPUT_ARRAY[@]}"
do
if [[ ${OUTPUT_ARRAY[$index]} == "failure" ]]; then
EMOJI="🆘"
else
EMOJI="✅"
fi
MSG="$MSG \n::: Status for ${JOB_NAME_ARRAY[$index]} job => ${OUTPUT_ARRAY[$index]} $EMOJI"
done
echo "message sent: $MSG"
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/test-extension-workflows-release-2.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,27 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL_EXT_WFS }}
run: |
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="Workflows testing for extensions failed! 🆘"
MSG_PREFIX="\nWorkflows testing for extensions failed! 🆘"
else
MSG_PREFIX="Workflows testing for extensions succedded! ✅"
MSG_PREFIX="\nWorkflows testing for extensions succedded! ✅"
fi
echo "message prefix ::: $MSG_PREFIX"
TAGS_OUTPUT_STRING="status for retrieve-tags-release-2-dot-9 - build => ${{ needs.retrieve-tags-release-2-dot-9.outputs.tags-job-status }}"
EXT_CHART_BUILD_OUTPUT_STRING="status for test-build-extension-charts-release-2-dot-9 - build => ${{ needs.test-build-extension-charts-release-2-dot-9.outputs.build-job-status }}"
EXT_CATALOG_BUILD_OUTPUT_STRING="status for test-build-extension-catalog-release-2-dot-9 - build => ${{ needs.test-build-extension-catalog-release-2-dot-9.outputs.build-extension-catalog-job-status }}"
RELEASE_SHELL_PKG_OUTPUT_STRING="status for test-release-shell-pkg-release-2-dot-9 - release => ${{ needs.test-release-shell-pkg-release-2-dot-9.outputs.build-release-shell-creators-status }}"
RELEASE_CREATORS_PKG_OUTPUT_STRING="status for test-release-creators-pkg-release-2-dot-9 - release => ${{ needs.test-release-creators-pkg-release-2-dot-9.outputs.build-release-shell-creators-status }}"
MSG="$MSG_PREFIX"
echo $TAGS_OUTPUT_STRING
echo $EXT_CHART_BUILD_OUTPUT_STRING
echo $EXT_CATALOG_BUILD_OUTPUT_STRING
echo $RELEASE_SHELL_PKG_OUTPUT_STRING
echo $RELEASE_CREATORS_PKG_OUTPUT_STRING
MSG="$MSG_PREFIX ::: $TAGS_OUTPUT_STRING ::: $EXT_CHART_BUILD_OUTPUT_STRING ::: $EXT_CATALOG_BUILD_OUTPUT_STRING ::: $RELEASE_SHELL_PKG_OUTPUT_STRING ::: $RELEASE_CREATORS_PKG_OUTPUT_STRING"
for index in "${!OUTPUT_ARRAY[@]}"
do
if [[ ${OUTPUT_ARRAY[$index]} == "failure" ]]; then
EMOJI="🆘"
else
EMOJI="✅"
fi
MSG="$MSG \n::: Status for ${JOB_NAME_ARRAY[$index]} job => ${OUTPUT_ARRAY[$index]} $EMOJI"
done
echo "message sent: $MSG"
Expand Down
2 changes: 1 addition & 1 deletion creators/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rancher/create-extension",
"description": "Rancher UI Extension generator",
"version": "3.0.4",
"version": "3.0.5",
"license": "Apache-2.0",
"author": "SUSE",
"packageManager": "yarn@4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion creators/extension/update/upgrade
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
BASE_DIR="$(cd $SCRIPT_DIR && cd .. && pwd)"
Expand Down

0 comments on commit ef76fec

Please sign in to comment.