Add a timeout for verify-repo-built-successful.py
This commit is contained in:
parent
9e328db488
commit
b0c4abff68
@ -11,10 +11,12 @@ logger() {
|
|||||||
|
|
||||||
polling_repo() {
|
polling_repo() {
|
||||||
logger "[CHECKING] Checking standard repository from ${PROJECT}"
|
logger "[CHECKING] Checking standard repository from ${PROJECT}"
|
||||||
OUTPUT=$(/usr/share/openSUSE-release-tools/verify-repo-built-successful.py -A ${API_URL} -p ${PROJECT} -r standard 2>&1)
|
OUTPUT=$(timeout 3m /usr/share/openSUSE-release-tools/verify-repo-built-successful.py -A ${API_URL} -p ${PROJECT} -r standard 2>&1)
|
||||||
RETURNCODE=$?
|
RETURNCODE=$?
|
||||||
if [ ${RETURNCODE} -eq 0 ]; then
|
if [ ${RETURNCODE} -eq 0 ]; then
|
||||||
logger "[READY] Repository is NOT building"
|
logger "[READY] Repository is NOT building"
|
||||||
|
elif [ ${RETURNCODE} -eq 124 ]; then
|
||||||
|
logger "[TIMEOUT] Verifying repository status reaches a timeout"
|
||||||
else
|
else
|
||||||
case ${OUTPUT} in
|
case ${OUTPUT} in
|
||||||
*"Repository "*" is not yet finished"*)
|
*"Repository "*" is not yet finished"*)
|
||||||
@ -61,6 +63,10 @@ if [ $? -eq 3 ]; then
|
|||||||
# Continue polling repository results: Repository is still building
|
# Continue polling repository results: Repository is still building
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
124)
|
||||||
|
# Retry polling repository results: Verifying repository results reaches a timeout
|
||||||
|
continue
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# Stop polling repository results: Failed polling results
|
# Stop polling repository results: Failed polling results
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user