Commit 0a8b1c0e authored by Holger Levsen's avatar Holger Levsen
Browse files

d-i: use repos from salsa (still needs work for mr svn repo and git push triggers)

parent 47a41ce8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -57,7 +57,9 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
* use static IP for the nodes (h01ger)
* use vmdebootstrap where applicable
* Tango Icons are gone: #824477 - update footer once this bug is fixed
* add to all git post-receive hooks: `curl -s "https://jenkins.debian.net/git/notifyCommit?url=git://git.debian.org/git/d-i/$(basename $PWD .git)"` which will trigger jenkins to pull (check) that git repo…
* this is outdated with salsa: add to all git post-receive hooks: `curl -s "https://jenkins.debian.net/git/notifyCommit?url=https://https://salsa.debian.org/installer-team/$(basename $PWD .git)"` which will trigger jenkins to pull (check) that git repo…
* salsa stuff:
** triggers for d-i repos are missing

=== ToDo for improving disk space

+9 −9
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ NON_PDF_LANGS=$1 ; shift
#
# define some variables
#
URL="https://anonscm.debian.org/viewvc/d-i/trunk/.mrconfig?view=co"
URL="https://anonscm.debian.org/viewvc/d-i/trunk/.mrconfig?view=co" #FIXME: adopt to salsa
FAIL=false
DI_BUILD_JOB_PATTERN=d-i_build_
DI_MANUAL_JOB_PATTERN=d-i_manual_
@@ -32,14 +32,14 @@ CLEANUP=$(mktemp)
echo
echo "Scanning $URL for referred 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-|cut -d " " -f1)
PACKAGES=$( grep salsa.debian.org/installer/team $TMPFILE|cut -d "/" -f6-|cut -d " " -f1)
#
# check for each git repo if a jenkins job exists
#
for PACKAGE in $PACKAGES ; do
	if grep -A 1 git+ssh://git.debian.org/git/d-i/$PACKAGE $TMPFILE | grep -q "deleted = true" ; then
	if grep -A 1 https://https://salsa.debian.org/installer-team/$PACKAGE $TMPFILE | grep -q "deleted = true" ; then
		# ignore deleted repos
		echo "Info: git+ssh://git.debian.org/git/d-i/$PACKAGE ignored as it has been deleted."
		echo "Info: https://https://salsa.debian.org/installer-team/$PACKAGE ignored as it has been deleted."
		continue
	elif [ ! -d ~jenkins/jobs/${DI_BUILD_JOB_PATTERN}${PACKAGE} ] ; then
		echo "Warning: No build job '${DI_BUILD_JOB_PATTERN}${PACKAGE}'."
@@ -48,7 +48,7 @@ for PACKAGE in $PACKAGES ; do
		# prepare yaml bits
		#
		echo "      - '{name}_build_$PACKAGE':" >> $PROJECT_JOBS
		echo "         gitrepo: 'git://git.debian.org/git/d-i/$PACKAGE'" >> $PROJECT_JOBS
		echo "         gitrepo: 'https://https://salsa.debian.org/installer-team/$PACKAGE'" >> $PROJECT_JOBS
		echo "- job-template:" >> $JOB_TEMPLATES
		echo "    defaults: d-i-build" >> $JOB_TEMPLATES
		echo "    name: '{name}_build_$PACKAGE'" >> $JOB_TEMPLATES
@@ -63,16 +63,16 @@ echo
echo "Checking if there are jenkins jobs for which there is no repo in $URL - or only a deleted one."
for JOB in $(ls -1 ~jenkins/jobs/ | grep ${DI_BUILD_JOB_PATTERN}) ; do
	REPONAME=${JOB:10}
	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
	if grep -q https://https://salsa.debian.org/installer-team/$REPONAME $TMPFILE ; then
		if grep -A 1 https://https://salsa.debian.org/installer-team/$REPONAME $TMPFILE | grep -q "deleted = true" ; then
			echo "Warning: Job $JOB exists, but has 'deleted = true' set in .mrconfig."
			if ! grep -q "'git://git.debian.org/git/d-i/$REPONAME'" /srv/jenkins/job-cfg/d-i.yaml ; then
			if ! grep -q "'https://https://salsa.debian.org/installer-team/$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 for git+ssh://git.debian.org/git/d-i/$REPONAME found."
			echo "Ok: Job $JOB for https://https://salsa.debian.org/installer-team/$REPONAME found."
		fi
	else
		echo "Warning: Git repo $REPONAME not found in $URL, but job $JOB exists."
+3 −3
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ if "jenkins-test-vm" == os.uname()[1]:

# add a special job for triggering from the pu/ branches
jobs.append( {'{name}_pu-triggered_{pkg}': {
                'gitrepo': 'git://git.debian.org/git/d-i/{pkg}',
                'gitrepo': 'https://https://salsa.debian.org/installer-team/{pkg}',
                'branchdesc': 'master branch',
                'branch': 'origin/pu/**',
                'pkg': 'debian-installer',
@@ -460,7 +460,7 @@ data.append(
    {'job-group': {
        'name': '{name}_build-group',
        'jobs': ['{name}_{act}_{pkg}'],
        'gitrepo': 'git://git.debian.org/git/d-i/{pkg}',
        'gitrepo': 'https://https://salsa.debian.org/installer-team/{pkg}',
        'act': 'build',
        'branchdesc': 'master branch',
        'branch': 'origin/master',
@@ -471,7 +471,7 @@ data.append(
    {'job-group': {
        'name': '{name}_pu-build-group',
        'jobs': ['{name}_pu-{act}_{pkg}'],
        'gitrepo': 'git://git.debian.org/git/d-i/{pkg}',
        'gitrepo': 'https://https://salsa.debian.org/installer-team/{pkg}',
        'act': 'build',
        'branchdesc': 'pu/ branches',
        'branch': 'origin/pu/**',