Verified Commit 1fb3417e authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

reproducible debian: Add a mean to very gracefully stop the rb workers



Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent b4426986
#!/bin/bash #!/bin/bash
# vim: set noexpandtab:
# Copyright © 2017 Holger Levsen (holger@layer-acht.org) # Copyright © 2017 Holger Levsen (holger@layer-acht.org)
# © 2018 Mattia Rizolo <mattia@debian.org>
# released under the GPLv=2 # released under the GPLv=2
set -e set -e
...@@ -41,6 +43,11 @@ while true ; do ...@@ -41,6 +43,11 @@ while true ; do
break break
fi fi
fi fi
LOCKFILE="/var/lib/jenkins/NO-RB-BUILDERS-PLEASE"
if [ -f "$LOCKFILE" ];
echo "The lockfile $LOCKFILE is present, thus stopping this"
break
fi
# sleep up to 2.3 seconds (additionally to the random sleep reproducible_build.sh does anyway) # sleep up to 2.3 seconds (additionally to the random sleep reproducible_build.sh does anyway)
/bin/sleep $(echo "scale=1 ; $(shuf -i 1-23 -n 1)/10" | bc ) /bin/sleep $(echo "scale=1 ; $(shuf -i 1-23 -n 1)/10" | bc )
......
[Unit] [Unit]
Description=Build service for reproducible-builds jobs Description=Build service for reproducible-builds jobs
ConditionPathExists=!/var/lib/jenkins/NO-RB-BUILDERS-PLEASE
[Service] [Service]
# Restart whenever the script exits, without rate limiting: # Restart whenever the script exits, without rate limiting:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment