From ea5870a4ee38a7fa4b3594e39a72e52b451541a7 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 12 Nov 2012 21:35:39 +0100 Subject: explain how to create yaml code for missing d-i jobs --- bin/d-i_check_jobs.sh | 19 +++++++++++++++++++ update_jdn.sh | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/bin/d-i_check_jobs.sh b/bin/d-i_check_jobs.sh index dd149abd..e73bed97 100755 --- a/bin/d-i_check_jobs.sh +++ b/bin/d-i_check_jobs.sh @@ -27,6 +27,8 @@ TMPFILE=$(mktemp) echo "Scanning $URL for reffered git repos which have no jenkins job associated." curl $URL > $TMPFILE 2>/dev/null PACKAGES=$( grep git.debian.org/git/d-i $TMPFILE|cut -d "/" -f6-) +JOB_TEMPLATES=$(mktemp) +PROJECT_JOBS=$(mktemp) # # check for each git repo if a jenkins job exists # @@ -34,6 +36,14 @@ for PACKAGE in $PACKAGES ; do if [ ! -d ~jenkins/jobs/${DI_JOBPATTERN}${PACKAGE} ] ; then echo "Warning: No build job '${DI_JOBPATTERN}${PACKAGE}'." FAIL=true + # + # prepare yaml bits + # + echo " - '{name}_build_$PACKAGE':" >> $PROJECT_JOBS + echo " gitrepo: 'git://git.debian.org/git/d-i/$PACKAGE'" >> $PROJECT_JOBS + echo "- job-template:" >> $JOB_TEMPLATES + echo " defaults: d-i-build" >> $JOB_TEMPLATES + echo " name: '{name}_build_anna'" >> $JOB_TEMPLATES else echo "Ok: Job '${DI_JOBPATTERN}${PACKAGE}' exists." fi @@ -60,6 +70,15 @@ echo "Warning: check for missing d-i manual build jobs not implemented" echo if $FAIL ; then figlet "Missing jobs!" + echo + echo "Add these job templates to job-cfg/d-i.yaml:" + cat $JOB_TEMPLATES + echo + echo + echo "Append this to the project definition in job-cfg/d-i.yaml:" + cat $PROJECT_JOBS + echo + rm $JOB_TEMPLATES $PROJECT_JOBS exit 1 else figlet ok diff --git a/update_jdn.sh b/update_jdn.sh index cacbf390..3f0700f5 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -80,3 +80,9 @@ if [ "$DEFINED_TRIGGERS" != "$CONFIGURED_TRIGGERS" ] ; then explain "Number of defined triggers ($DEFINED_TRIGGERS) differs from configured triggers ($CONFIGURED_TRIGGERS), please investigate." fi +# +# FIXME: this should also only be run once +# +sudo su - jenkins -c git config --global user.email jenkins@jenkins.debian.net +sudo su - jenkins -c git config --global user.name "Jenkins" + -- cgit v1.2.3-54-g00ecf