Skip to content

Commit c79af10

Browse files
authored
[.github] fix workspace integration tests (#20698)
* [.github] search completed runs * [.github] we were scraping a main-gha version from a dev image This ensures we scrap what leeway is building * Fix
1 parent 257d79c commit c79af10

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/workspace-integration-tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ jobs:
8989
echo "version=${{ inputs.version }}"
9090
} >> $GITHUB_OUTPUT
9191
else
92-
# Search the last 10 builds regardless of status (success and failed)
93-
RUNID=$(gh run list --repo gitpod-io/gitpod --branch main --workflow build.yml --limit 10 --json createdAt,conclusion,databaseId --jq 'map(select(.conclusion == "success")) | sort_by(.createdAt) | .[-1] | .databaseId')
92+
# Search the last 10 completed builds (any conclusion except null/in-progress)
93+
RUNID=$(gh run list --repo gitpod-io/gitpod --branch main --workflow build.yml --limit 10 --json createdAt,conclusion,databaseId --jq 'map(select(.conclusion != null)) | sort_by(.createdAt) | .[-1] | .databaseId')
9494
if [ "$RUNID" == "" ]; then
95-
echo no successful build found on main branch in the last 10 commits, see https://github.com/gitpod-io/gitpod/actions/workflows/build.yml for details | tee -a $GITHUB_STEP_SUMMARY
95+
echo no completed build found on main branch in the last 10 commits, see https://github.com/gitpod-io/gitpod/actions/workflows/build.yml for details | tee -a $GITHUB_STEP_SUMMARY
9696
# if we got here, it means in the last 10 builds on main, there wasn't a success, and then we'll keep getting this message
9797
# to fix, manually trigger the tests with the latest main-gha asset till we get a success
9898
# you might have to fix or disable flakey tests to do this
@@ -102,8 +102,12 @@ jobs:
102102
exit 1
103103
fi
104104
105+
echo "Using RUNID $RUNID" | tee -a $GITHUB_STEP_SUMMARY
106+
MAIN_VERSION=$(gh run view "$RUNID" --log -R gitpod-io/gitpod | grep "leeway build --cache remote -Dversion=" | grep 'main-gha.[0-9]*' -o | head -n 1)
107+
echo "Using version $MAIN_VERSION" | tee -a $GITHUB_STEP_SUMMARY
108+
105109
{
106-
echo "version=$(gh run view "$RUNID" --log -R gitpod-io/gitpod | grep 'main-gha.[0-9]*' -o | head -n 1)"
110+
echo "version=$MAIN_VERSION"
107111
} >> $GITHUB_OUTPUT
108112
fi
109113
if [[ '${{ inputs.image_repo_base }}' != '' ]]; then

0 commit comments

Comments
 (0)