de9a000
@@ -34,7 +34,19 @@
fi
copr watch-build "$build_id"
- exit_status=$?
+ status=$(copr status "$build_id")
+ if [ "$status" = "failed" ]
+ then
+ exit_status=1
+ elif [ "$status" = "succeeded" ]
+ exit_status=0
+ elif [ "$status" = "canceled" ]
+ exit_status=2
+ else
+ exit_status=1000
+ fi
log
The copr-ping package appears in nagios as failed even though the build was successful. It will be maybe safer to find out the status of the build after copr watch-build has finished, using copr status.
Build succeeded.
I'm not sure if this will help, however, it looks like the problem is in the copr-ping.sh shell script. Even though build 3427362 was successful this script wrote into the log exit_status=1. And copr status 3427362 returned succeeded which is the correct status.
exit_status=1
copr status 3427362
succeeded
Pull-Request has been closed by schlupov
The copr-ping package appears in nagios as failed even though the build was successful.
It will be maybe safer to find out the status of the build after copr watch-build has finished, using copr status.