Merge pull request #3154 from gleidi-suse/fix_auto_freeze
gocd: slfo-stagings: Avoid busy waiting for 50 minutes, instead rely on scheduling from GoCD.
This commit is contained in:
commit
da9a918d00
@ -24,11 +24,16 @@ pipelines:
|
||||
- staging-bot
|
||||
tasks:
|
||||
- script: |-
|
||||
set -eu
|
||||
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
|
||||
done
|
||||
status="$(osc -A $STAGING_API api /build/$SLFO_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/')"
|
||||
echo $SLFO_RING_1_PROJECT status: "${status}"
|
||||
if [ printf '%s' "${status}" | grep -q finished ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
- Freeze.stagings:
|
||||
## 6 hours (at most 30 minutes per staging)
|
||||
timeout: 360
|
||||
|
@ -25,11 +25,16 @@ pipelines:
|
||||
- staging-bot
|
||||
tasks:
|
||||
- script: |-
|
||||
set -eu
|
||||
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
|
||||
done
|
||||
status="$(osc -A $STAGING_API api /build/$SLFO_RING_1_PROJECT/standard/x86_64?view=status | grep 'code=' | sed -E 's/^.*code="(.*)".*$/\1/')"
|
||||
echo $SLFO_RING_1_PROJECT status: "${status}"
|
||||
if [ printf '%s' "${status}" | grep -q finished ]; then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
- Freeze.stagings:
|
||||
## 6 hours (at most 30 minutes per staging)
|
||||
timeout: 360
|
||||
|
Loading…
x
Reference in New Issue
Block a user