Skip to content

Commit

Permalink
GoCD cancels jobs when they do not generate any console output for mo…
Browse files Browse the repository at this point in the history
…re than the timeout minute(s).
  • Loading branch information
gleidi-suse committed Sep 4, 2024
1 parent 94791de commit 30cca0a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions gocd/slfo-stagings.gocd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ pipelines:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
while osc -A $STAGING_API api /build/$SLFO_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/' | grep -q finished; ret=$?; [ ${ret} -ne 0 ]; do
sleep 60
while : ; do
status="$(osc -A $STAGING_API api /build/$SLFO_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/')"
if [ printf '%s' "${status}" | grep -q finished ]; then
break
else
echo $SLFO_RING_1_PROJECT is still building with status: "${status}"
sleep 60
fi
done
- Freeze.stagings:
## 6 hours (at most 30 minutes per staging)
Expand Down
10 changes: 8 additions & 2 deletions gocd/slfo-stagings.gocd.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ pipelines:
- script: |-
export PYTHONPATH=$PWD/scripts
cd scripts/gocd
while osc -A $STAGING_API api /build/$SLFO_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/' | grep -q finished; ret=$?; [ ${ret} -ne 0 ]; do
sleep 60
while : ; do
status="$(osc -A $STAGING_API api /build/$SLFO_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/')"
if [ printf '%s' "${status}" | grep -q finished ]; then
break
else
echo $SLFO_RING_1_PROJECT is still building with status: "${status}"
sleep 60
fi
done
- Freeze.stagings:
## 6 hours (at most 30 minutes per staging)
Expand Down

0 comments on commit 30cca0a

Please sign in to comment.