X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Finclude-raw-jjb-update.sh;h=84a91cb90b2d41991fe19671ae88234d84a38603;hb=refs%2Fchanges%2F84%2F37684%2F1;hp=e16f1db0dce18d50759955eb82bb2cf22c1c1cdb;hpb=985bf8afd2d2d78ce44b45ac37e12a2a908870a0;p=releng%2Fbuilder.git diff --git a/jjb/include-raw-jjb-update.sh b/jjb/include-raw-jjb-update.sh index e16f1db0d..84a91cb90 100644 --- a/jjb/include-raw-jjb-update.sh +++ b/jjb/include-raw-jjb-update.sh @@ -1,8 +1,11 @@ -source /opt/virtualenv/jenkins-job-builder/bin/activate -jenkins-jobs update jjb/ +jenkins-jobs update --recursive --delete-old jjb/ # Submit patches for any jobs that can be auto updated +function submitJJB { + git commit -asm "Update automated project templates" + git push origin HEAD:refs/for/master +} + gitdir=$(git rev-parse --git-dir); scp -p -P 29418 jenkins-releng@git.opendaylight.org:hooks/commit-msg ${gitdir}/hooks/ python scripts/jjb-autoupdate-project.py -git commit -asm "Update automated project templates" -git push origin HEAD:refs/for/master +git diff --exit-code || submitJJB