Skip to content
Merged
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
17 changes: 1 addition & 16 deletions .github/workflows/trigger-hpsf-gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,8 @@ jobs:
echo "Waiting on GitLab pipeline $PIPELINE_ID..."

STATUS="running"
MAX_WAIT=86400 # 24 hours
ELAPSED=0

while [[ "$STATUS" == "running" || "$STATUS" == "pending" ]]; do
if [ $ELAPSED -ge $MAX_WAIT ]; then
echo "Timeout waiting for pipeline after $MAX_WAIT seconds"
echo "final_status=timeout" >> $GITHUB_OUTPUT
exit 1
fi

if [ $ELAPSED -lt 7200 ]; then
SLEEP_TIME=600 # 10 minutes
else
SLEEP_TIME=3600 # 1 hour
fi
sleep $SLEEP_TIME
ELAPSED=$((ELAPSED + SLEEP_TIME))
sleep 900 # 15 minutes

STATUS=$(curl -s \
"https://gitlab.spack.io/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/pipelines/$PIPELINE_ID" \
Expand Down
Loading