diff options
-rwxr-xr-x | bin/d-i_build.sh | 16 | ||||
-rwxr-xr-x | bin/lvc.sh | 16 | ||||
-rwxr-xr-x | job-cfg/d-i.yaml.py | 45 | ||||
-rw-r--r-- | job-cfg/lvc.yaml | 6 |
4 files changed, 78 insertions, 5 deletions
diff --git a/bin/d-i_build.sh b/bin/d-i_build.sh index 09903625..3c6540cc 100755 --- a/bin/d-i_build.sh +++ b/bin/d-i_build.sh @@ -91,6 +91,21 @@ preserve_pu_udebs() { cp $WORKSPACE/../*.udeb $PU_BRANCH_DIR } +preserve_miniiso() { + # + # check if we built the images + # + IMAGETAR=../debian-installer-images_*.tar.gz + [ -f $IMAGETAR ] || return 0 + + TARGETGTK=/srv/d-i/isos/mini-gtk.iso + TARGETTEXT=/srv/d-i/isos/mini-text.iso + + tar -xvzf $IMAGETAR --no-anchored mini.iso + mv -f installer-*/*/images/netboot/gtk/mini.iso $TARGETGTK # FIXME should probably include the data and the ARCH in the name, and if in a pu/ branch that as well + #mv installer-*/*/images/netboot/mini.iso $TARGETTEXT +} + clean_workspace # # if $1 is not given, build the package normally, @@ -99,6 +114,7 @@ clean_workspace if [ "$1" = "" ] ; then pdebuild_package preserve_pu_udebs + preserve_miniiso else echo do something else ; exit 1 fi @@ -11,6 +11,22 @@ common_init "$@" # $1 = wget url/jigdo url URL=$1 ; shift +replace_origin_pu() { + PREFIX=$1 ; shift + BRANCH=$1 ; shift + expr "$BRANCH" : 'origin/pu/' >/dev/null || return 1 + echo "${PREFIX}${BRANCH#origin/pu/}" +} + +# if $URL is set to something that looks like a pu git branch, try to find the matching .iso +if PU_ISO="$(replace_origin_pu "/srv/d-i/isos/mini-gtk-" $URL).iso" ; then + [ -f $PU_ISO ] || { + echo "looks like we're meant to be testing '$PU_ISO', but it's missing" + exit 1 + } + URL=$PU_ISO +fi + cleanup_all() { find . -name \*.vlog.png -print0 | xargs -0 -r rm echo "Trying to preserve last screenshot…" diff --git a/job-cfg/d-i.yaml.py b/job-cfg/d-i.yaml.py index 78fe0124..73283a55 100755 --- a/job-cfg/d-i.yaml.py +++ b/job-cfg/d-i.yaml.py @@ -189,7 +189,17 @@ jobs = [ if "jenkins-test-vm" == os.uname()[1]: pkgs = [ 'debian-installer', 'preseed' ] - jobs = [ '{name}_build-group', '{name}_pu-build-group' ] + jobs = [ '{name}_build-group', '{name}_pu-build-group'] + +# add a special job for triggering from the pu/ branches +jobs.append( {'{name}_{act}_{pkg}': { + 'gitrepo': 'git://git.debian.org/git/d-i/{pkg}', + 'branchdesc': 'master branch', + 'branch': 'origin/master', + 'act': 'pu-triggered', + 'pkg': 'debian-installer', + 'trg': None, + }} ) def scm_svn(po, inc_regs=None): if inc_regs is None: @@ -357,13 +367,40 @@ data.extend( 'triggers': [{'pollscm': {'cron': '{trg}'}}], 'scm': [{'git': {'url': '{gitrepo}', 'branches': ['{branch}']}}], - 'builders': [{'shell': '/srv/jenkins/bin/d-i_build.sh'}], + 'builders': [{'shell': '/srv/jenkins/bin/d-i_build.sh'}, + {'trigger-builds': [{'project': 'lvc_debian-miniiso', + 'current-parameters': 'true', + }]}], + 'project-type': 'freestyle', + 'properties': prop(type='packages', priority=99), + 'parameters': [{'string': {'name': 'PU_GIT_BRANCH', + 'description': 'The git branch that triggered the build that reulted in this subsequent build'}}], + 'logrotate': lr(90), + 'publishers': publ(irc='debian-boot')}}]) + +data.extend( + [{'defaults': { + 'name': '{name}-pu-{act}', + 'description': ('Builds debian packages in sid from git {branchdesc}, ' + 'triggered by pushes to <pre>{gitrepo}</pre> ' + '{do_not_edit}'), + 'triggers': [{'pollscm': {'cron': '{trg}'}}], + 'scm': [{'git': {'url': '{gitrepo}', + 'branches': ['{branch}']}}], + 'builders': [ {'shell': '/srv/jenkins/bin/d-i_build.sh'}, + {'trigger-builds': [{'project': 'd-i_pu-triggered_debian-installer', + 'current-parameters': 'true', + 'predefined-parameters': 'PU_GIT_BRANCH=$GIT_BRANCH' + }, + ]} + ], 'project-type': 'freestyle', 'properties': prop(type='packages', priority=99), 'logrotate': lr(90), 'publishers': publ(irc='debian-boot')}}]) templs.append(jtmpl(act='{act}', target='{pkg}')) +templs.append(jtmpl(act='pu-{act}', target='{pkg}')) data.extend(templs) data.append( @@ -456,9 +493,9 @@ data.append( data.append( {'job-group': { 'name': '{name}_pu-build-group', - 'jobs': ['{name}_{act}_{pkg}'], + 'jobs': ['{name}_pu-{act}_{pkg}'], 'gitrepo': 'git://git.debian.org/git/d-i/{pkg}', - 'act': 'pu-build', + 'act': 'build', 'branchdesc': 'pu/ branches', 'branch': 'origin/pu/**', 'trg': 'H/10 * * * *', diff --git a/job-cfg/lvc.yaml b/job-cfg/lvc.yaml index 11077d47..632e6aba 100644 --- a/job-cfg/lvc.yaml +++ b/job-cfg/lvc.yaml @@ -22,6 +22,10 @@ option: category categories: - lvc + parameters: + - string: + name: PU_GIT_BRANCH + description: The git branch that triggered the build that reulted in this subsequent build logrotate: daysToKeep: 90 numToKeep: 20 @@ -71,7 +75,7 @@ my_time: 'H */8 * * *' - 'debian-miniiso': dist_name: 'Debian-Installer local mini.iso' - my_iso: '/srv/d-i/isos/mini.iso' + my_iso: '$PU_GIT_BRANCH' - 'debian-testing-daily-broken': dist_name: 'Debian-Installer Testing (Daily) -- Broken Scenarios' my_iso: 'http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/debian-testing-amd64-netinst.iso' |