summaryrefslogtreecommitdiffstats
path: root/bin/d-i_check_jobs.sh
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-10-26 12:49:42 +0100
committerHolger Levsen <holger@layer-acht.org>2014-10-26 12:49:42 +0100
commitf03f8eae97d04984eb0d912613807081eaa4e6fc (patch)
tree721bc00aff604040443198b52a17f58cd119d21a /bin/d-i_check_jobs.sh
parent528e716dea02f3ac3399bad25f906ab17127c7a7 (diff)
downloadjenkins.debian.net-f03f8eae97d04984eb0d912613807081eaa4e6fc.tar.xz
d-i: only suggest to delete jobs if they have already been deleted from the .yaml file which defines them. if thats the case, suggest to delete the job
Diffstat (limited to 'bin/d-i_check_jobs.sh')
-rwxr-xr-xbin/d-i_check_jobs.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/d-i_check_jobs.sh b/bin/d-i_check_jobs.sh
index 67f50341..de9e2e14 100755
--- a/bin/d-i_check_jobs.sh
+++ b/bin/d-i_check_jobs.sh
@@ -61,9 +61,13 @@ for JOB in $(ls -1 ~jenkins/jobs/ | grep ${DI_BUILD_JOB_PATTERN}) ; do
if grep -q git+ssh://git.debian.org/git/d-i/$REPONAME $TMPFILE ; then
if grep -A 1 git+ssh://git.debian.org/git/d-i/$REPONAME $TMPFILE | grep -q "deleted = true" ; then
echo "Warning: Job $JOB exists, but has 'deleted = true' set in .mrconfig."
- echo "jenkins-jobs delete $JOB" >> $CLEANUP
+ if ! grep -q "'git://git.debian.org/git/d-i/$REPONAME'" /srv/jenkins/job-cfg/d-i.yaml ; then
+ echo "jenkins-jobs delete $JOB" >> $CLEANUP
+ else
+ echo "# Please remove $JOB from job-cfg/d-i.yaml before deleting the job." >> $CLEANUP
+ fi
else
- echo "Ok: Job $JOB with git+ssh://git.debian.org/git/d-i/$REPONAME found."
+ echo "Ok: Job $JOB for git+ssh://git.debian.org/git/d-i/$REPONAME found."
fi
else
echo "Warning: Git repo $REPONAME not found in $URL, but job $JOB exists."
@@ -162,8 +166,7 @@ elif [ -s $CLEANUP ] ; then
echo
cat $CLEANUP
echo
- figlet "Achtung:"
- echo "Do not forget to also and ***first*** delete these jobs from job-cfg/d-i.yaml - else they will be recreated and build attempted, which will fail and cause notifications..."
+ echo "Jobs need to be deleted from job-cfg/d-i.yaml first, before deleting them with jenkins-jobs, cause else they will be recreated and then builds will be attempted, which will fail and cause notifications..."
# FIXME: adopt this text once job-cfg/d-i.yaml.py generates job-cfg/d-i.yaml
else
figlet ok