[Qa-jenkins-scm] [jenkins.debian.net] 01/01: improve update logic to only update jobs if configs have changed
Holger Levsen
holger at layer-acht.org
Mon Jun 20 21:35:34 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 1fecba09c8aef71c92653bb64b476478ac151a63
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Jun 20 23:34:55 2016 +0200
improve update logic to only update jobs if configs have changed
---
update_jdn.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/update_jdn.sh b/update_jdn.sh
index 5c0c858..e11179c 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -513,7 +513,13 @@ if [ "$HOSTNAME" = "jenkins" ] || [ "$HOSTNAME" = "jenkins-test-vm" ] ; then
done
rm -f $TMPFILE
for config in *.yaml ; do
- if [ $config -nt $STAMP ] || [ ! -f $STAMP ] ; then
+ # do update, if
+ # no stamp file exist or
+ # no .py file exists and config is newer than stamp or
+ # a .py file exists and .py file is newer than stamp
+ if [ ! -f $STAMP ] || \
+ ( [ ! -f $config.py ] && [ $config -nt $STAMP ] ) || \
+ ( [ -f $config.py ] && [ $config.py -nt $STAMP ] ) ; then
$JJB update $config
else
echo "$config has not changed, nothing to do."
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list