optional "make prep"
This commit is contained in:
parent
25cf5f78e1
commit
7521198a8c
3 changed files with 11 additions and 1 deletions
|
|
@ -344,6 +344,12 @@ class KiwiCreateImageTask(BaseBuildTask):
|
|||
self.logger.debug('BASEURL: %s' % baseurl)
|
||||
repos.append(baseurl)
|
||||
|
||||
if opts.get('make_prep'):
|
||||
cmd = ['make', 'prep']
|
||||
rv = broot.mock(['--cwd', broot.tmpdir(within=True), '--chroot', '--'] + cmd)
|
||||
if rv:
|
||||
raise koji.GenericError("Preparation step failed")
|
||||
|
||||
path = os.path.join(scmsrcdir, desc_path)
|
||||
desc, types = self.prepareDescription(path, name, version, repos)
|
||||
self.uploadFile(desc)
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ def handle_kiwi_build(goptions, session, args):
|
|||
help="Do not display progress of the upload")
|
||||
parser.add_option("--kiwi-profile", action="store", default=None,
|
||||
help="Select profile from description file")
|
||||
parser.add_option("--make-prep", action="store_true", default=False,
|
||||
help="Run 'make prep' in checkout before starting the build")
|
||||
parser.add_option("--can-fail", action="store", dest="optional_arches",
|
||||
metavar="ARCH1,ARCH2,...", default="",
|
||||
help="List of archs which are not blocking for build "
|
||||
|
|
@ -52,6 +54,7 @@ def handle_kiwi_build(goptions, session, args):
|
|||
if arch],
|
||||
'profile': options.kiwi_profile,
|
||||
'release': options.release,
|
||||
'make_prep': options.make_prep,
|
||||
}
|
||||
|
||||
arches = []
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ koji.tasks.LEGACY_SIGNATURES['createKiwiImage'] = [
|
|||
|
||||
@export
|
||||
def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile=None,
|
||||
scratch=False, priority=None, repos=None, release=None):
|
||||
scratch=False, priority=None, make_prep=False, repos=None, release=None):
|
||||
context.session.assertPerm('image')
|
||||
taskOpts = {
|
||||
'channel': 'image',
|
||||
|
|
@ -34,6 +34,7 @@ def kiwiBuild(target, arches, desc_url, desc_path, optional_arches=None, profile
|
|||
'scratch': scratch,
|
||||
'release': release,
|
||||
'repos': repos or [],
|
||||
'make_prep': make_prep,
|
||||
}
|
||||
return kojihub.make_task('kiwiBuild',
|
||||
[target, arches, desc_url, desc_path, opts],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue