This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Extension workflows | ||
on: | ||
push: | ||
branches: | ||
- 12032-reusable-wf-tests-2 | ||
# schedule: | ||
# - cron: "0 0 * * *" | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./ | ||
# TODO: replace all instances of "aalves08" and "12032-reusable-wf-tests-2" | ||
jobs: | ||
retrieve-tags-master: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
SHELL_TAG: ${{ steps.retrieve-data.outputs.SHELL_TAG }} | ||
CREATORS_TAG: ${{ steps.retrieve-data.outputs.CREATORS_TAG }} | ||
ECI_TAG: ${{ steps.retrieve-data.outputs.ECI_TAG }} | ||
EXTENSIONS_TAG: ${{ steps.retrieve-data.outputs.EXTENSIONS_TAG }} | ||
CURR_JOB_ID: ${{ github.job }} | ||
tags-job-status: ${{ job.status }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 12032-reusable-wf-tests-2 | ||
- name: Retrieve Shell and Creators versions | ||
run: source ./shell/scripts/retrieve-versions.sh | ||
id: retrieve-data | ||
shell: bash | ||
test-build-extension-charts-master: | ||
needs: retrieve-tags-master | ||
uses: aalves08/dashboard/.github/workflows/build-extension-charts.yml@12032-reusable-wf-tests-2 | ||
permissions: | ||
actions: write | ||
contents: write | ||
deployments: write | ||
pages: write | ||
with: | ||
target_branch: 'gh-pages' | ||
tagged_release: ${{ needs.retrieve-tags-master.outputs.EXTENSIONS_TAG }} | ||
is_test: 'true' | ||
test_ext_repo: 'ui-plugin-examples' | ||
test_ext_branch: 'main' | ||
test-build-extension-catalog-master: | ||
needs: retrieve-tags-master | ||
uses: aalves08/dashboard/.github/workflows/build-extension-catalog.yml@12032-reusable-wf-tests-2 | ||
permissions: | ||
actions: write | ||
contents: read | ||
packages: write | ||
with: | ||
registry_target: ghcr.io | ||
registry_user: ${{ github.actor }} | ||
tagged_release: ${{ needs.retrieve-tags-master.outputs.ECI_TAG }} | ||
is_test: 'true' | ||
test_ext_repo: 'ui-plugin-examples' | ||
test_ext_branch: 'main' | ||
secrets: | ||
registry_token: ${{ secrets.GITHUB_TOKEN }} | ||
test-release-shell-pkg-master: | ||
needs: retrieve-tags-master | ||
uses: aalves08/dashboard/.github/workflows/release-shell-pkg.yaml@12032-reusable-wf-tests-2 | ||
with: | ||
is_test: 'true' | ||
test_branch: '12032-reusable-wf-tests-2' | ||
tag: ${{ needs.retrieve-tags-master.outputs.SHELL_TAG }} | ||
test-release-creators-pkg-master: | ||
needs: retrieve-tags-master | ||
uses: aalves08/dashboard/.github/workflows/release-shell-pkg.yaml@12032-reusable-wf-tests-2 | ||
with: | ||
is_test: 'true' | ||
test_branch: '12032-reusable-wf-tests-2' | ||
tag: ${{ needs.retrieve-tags-master.outputs.CREATORS_TAG }} | ||
slack-message: | ||
if: ${{ always() }} | ||
runs-on: ubuntu-latest | ||
needs: [retrieve-tags-master, test-build-extension-charts-master, test-build-extension-catalog-master, test-release-shell-pkg-master, test-release-creators-pkg-master] | ||
# TODO: SLACK_WEBHOOK_URL_EXT_WFS not SLACK_WEBHOOK_URL | ||
steps: | ||
- name: Slack message for workflow | ||
if: always() | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL_EXT_WFS }} | ||
run: | | ||
Check failure on line 90 in .github/workflows/test-extension-workflows.yml GitHub Actions / Test Extension workflowsInvalid workflow file
|
||
TAGS_OUTPUT=${{ needs.retrieve-tags-master.outputs.tags-job-status }} | ||
EXT_CHART_BUILD_OUTPUT=${{ needs.test-build-extension-charts-master.outputs.build-job-status }} | ||
EXT_CHART_RELEASE_OUTPUT=${{ needs.test-build-extension-charts-master.outputs.release-job-status }} | ||
EXT_CATALOG_BUILD_OUTPUT=${{ needs.test-build-extension-catalog-master.outputs.build-extension-catalog-job-status }} | ||
RELEASE_SHELL_PKG_OUTPUT=${{ needs.test-release-shell-pkg-master.outputs.build-release-shell-creators-status }} | ||
RELEASE_CREATORS_PKG_OUTPUT=${{ needs.test-release-creators-pkg-master.outputs.build-release-shell-creators-status }} | ||
OUTPUT_ARRAY=(${TAGS_OUTPUT} ${EXT_CHART_BUILD_OUTPUT} ${EXT_CHART_RELEASE_OUTPUT} ${EXT_CATALOG_BUILD_OUTPUT} $RELEASE_SHELL_PKG_OUTPUT $RELEASE_CREATORS_PKG_OUTPUT) | ||
if [[ ${OUTPUT_ARRAY[@]} =~ "failure" ]]; then | ||
MSG_PREFIX="Workflows testing for extensions succedded! ✅" | ||
else | ||
MSG_PREFIX="Workflows testing for extensions failed! 🆘" | ||
fi | ||
echo "message prefix ::: $MSG_PREFIX" | ||
TAGS_OUTPUT_STRING="status for retrieve-tags-master - build ::: ${{ TAGS_OUTPUT }}" | ||
EXT_CHART_BUILD_OUTPUT_STRING="status for test-build-extension-charts-master - build ::: ${{ EXT_CHART_BUILD_OUTPUT }}" | ||
EXT_CHART_RELEASE_OUTPUT_STRING="status for test-build-extension-charts-master - release ::: ${{ EXT_CHART_RELEASE_OUTPUT }}" | ||
EXT_CATALOG_BUILD_OUTPUT_STRING="status for test-build-extension-catalog-master - build ::: ${{ EXT_CATALOG_BUILD_OUTPUT }}" | ||
RELEASE_SHELL_PKG_OUTPUT_STRING="status for test-release-shell-pkg-master - release ::: ${{ RELEASE_SHELL_PKG_OUTPUT }}" | ||
RELEASE_CREATORS_PKG_OUTPUT_STRING="status for test-release-creators-pkg-master - release ::: ${{ RELEASE_CREATORS_PKG_OUTPUT }}" | ||
echo $TAGS_OUTPUT_STRING | ||
echo $EXT_CHART_BUILD_OUTPUT_STRING | ||
echo $EXT_CHART_RELEASE_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_CHART_RELEASE_OUTPUT_STRING ::: $EXT_CATALOG_BUILD_OUTPUT_STRING ::: $RELEASE_SHELL_PKG_OUTPUT_STRING ::: $RELEASE_CREATORS_PKG_OUTPUT_STRING" | ||
echo "message sent: $MSG" | ||
curl -X POST -H 'Content-type: application/json; charset=utf-8' \ | ||
--data '{ branch: "master", message: $MSG }' $SLACK_WEBHOOK | ||
# - name: Slack message for workflow success | ||
# env: | ||
# SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
# if: success() | ||
# shell: bash | ||
# run: | | ||
# echo "JOBS SUCCEEDED: ${{ github.job }}" | ||
# curl -X POST \ | ||
# -H "Content-type: application/json; charset=utf-8" \ | ||
# --data '{"name": "${{ github.job }}", "status": "Extensions workflow test succedded! ✅", "workflow_run": ${{ github.run_id }} }' \ | ||
# $SLACK_URL |