From 2f02f9d812e16a2290138255c848adf017fce8f2 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Wed, 15 Jun 2016 11:39:14 +0200 Subject: lvc: do plumbing to kick off lvc when a pu branch created a new miniiso Signed-off-by: Holger Levsen --- job-cfg/d-i.yaml.py | 45 +++++++++++++++++++++++++++++++++++++++++---- job-cfg/lvc.yaml | 6 +++++- 2 files changed, 46 insertions(+), 5 deletions(-) (limited to 'job-cfg') 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
{gitrepo}
' + '{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' -- cgit v1.2.3-54-g00ecf