Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/actions/gke-xpk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,12 @@ runs:

if [ $? -ne 0 ]; then
echo "The JobSet ${WORKLOAD_NAME} on ${{ inputs.GKE_CLUSTER }} did not complete as expected "
echo "XPK_EXIT_CODE=1" >> ${GITHUB_ENV}
exit 1
fi

eval "export ${MAYBE_XPK_EXIT_CODE}"
echo "XPK_EXIT_CODE=${EXIT_CODE}" >> ${GITHUB_ENV}
exit ${EXIT_CODE}

- name: Clean up JobSet from cluster
Expand Down Expand Up @@ -268,3 +270,39 @@ runs:
if: ${{ always() }}
run: |
sudo rm -rf ${WORKLOAD_NAME}

- name: Generate sitrep
id: sitrep
shell: bash -x -e {0}
if: ${{ always() }}
run: |
source .github/workflows/scripts/to_json.sh
badge_label="${{ matrix.test }}"

summary="${{ inputs.WORKLOAD_NAME_PREFIX }}"
outcome=success
badge_label="${{ inputs.WORKLOAD_NAME_PREFIX }}"
badge_color=brightgreen

if [ "${XPK_EXIT_CODE}" -gt 0 ]; then
badge_color=red
outcome=failed
summary+=": fail"
else
summary+=": pass"
fi

to_json summary \
badge_label \
badge_color \
outcome | \
tee sitrep.json

- name: Upload sitrep to GitHub Actions from runner
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.WORKLOAD_NAME_PREFIX }}-sitrep
path: |
sitrep.json

Loading