commit d6530c4856eacce47fd403329218d95504a8c3a9
parent 91f112141ef5c4028645bc1c6f7acd0ac0b92be7
Author: parazyd <parazyd@dyne.org>
Date: Thu, 27 Jul 2017 13:20:01 +0200
support any and any_qemusys in buildadd
Diffstat:
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/buildadd.py b/buildadd.py
@@ -7,11 +7,11 @@ Module to add or modify Jenkins build jobs
import sys
from os import environ as env
-from os.path import basename, dirname
+from os.path import basename
import jenkins
from config import (jenkins_user, jenkins_pass, jenkins_host, jobtypes,
- arches_qemusys, architectures, dryrun)
+ arches_qemusys, arches_any, architectures, dryrun)
from funcs import fill_template
@@ -19,11 +19,17 @@ def main():
"""
Main function
"""
- print('* Requested job creation/modification')
-
# Used to differ whether we're adding or modifying
progname = basename(sys.argv[0])
+ if progname == 'buildadd.py':
+ print('* Requested job creation')
+ elif progname == 'buildmodify.py':
+ print('* Requested job modification')
+ else:
+ print('Invalid basename. Exiting...')
+ sys.exit(1)
+
print('- Connecting to Jenkins...')
jenk = jenkins.Jenkins(jenkins_host, jenkins_user, jenkins_pass)
@@ -53,23 +59,27 @@ def main():
qemusys = []
jlabels = []
for arg in sys.argv[1:]:
- # XXX: What is build_sequential?
if arg == 'sequential':
build_sequential = 'true'
- # XXX: What is pbuilder_network?
elif arg == 'pbuilder_network':
add_buildvar = 'export PBUILDER_USENETWORK=true'
+ elif arg == 'any':
+ arches = arches_any
+ elif arg == 'any_qemusys':
+ qemusys = arches_qemusys
elif arg in architectures:
arches.append(arg)
- # XXX: What is qemusys?
elif arg in arches_qemusys:
qemusys.append(arg)
+ # in original releasebot, no arch specified implies all of them
+ # not sure if we should imply this. explicitly declaring our
+ # architectures brings readability and better understanding
# set is to remove dupes
jlabels = list(set(arches + qemusys))
# XXX: now there is some mention of description
- # and puilder_network again. Wat do?
+ # which seems the gitlab issue description. did we ever pass this?
# Here we use the XML template
pxml = fill_template(pkgname, jobt, arches,