provide a choice on stage or peridot for live
This commit is contained in:
parent
bd8363f89a
commit
5989f4392f
@ -11,6 +11,7 @@ parser = argparse.ArgumentParser(description="Live ISO Compose")
|
|||||||
parser.add_argument('--release', type=str, help="Major Release Version or major-type (eg 9-beta)", required=True)
|
parser.add_argument('--release', type=str, help="Major Release Version or major-type (eg 9-beta)", required=True)
|
||||||
parser.add_argument('--isolation', type=str, help="Mock Isolation")
|
parser.add_argument('--isolation', type=str, help="Mock Isolation")
|
||||||
parser.add_argument('--local-compose', action='store_true', help="Compose Directory is Here")
|
parser.add_argument('--local-compose', action='store_true', help="Compose Directory is Here")
|
||||||
|
parser.add_argument('--peridot', action='store_true', help="Use peridot repos")
|
||||||
parser.add_argument('--image', type=str, help="Granular choice in which live image is built")
|
parser.add_argument('--image', type=str, help="Granular choice in which live image is built")
|
||||||
parser.add_argument('--logger', type=str)
|
parser.add_argument('--logger', type=str)
|
||||||
parser.add_argument('--live-iso-mode', type=str, default='local')
|
parser.add_argument('--live-iso-mode', type=str, default='local')
|
||||||
@ -29,6 +30,7 @@ a = LiveBuild(
|
|||||||
live_iso_mode=results.live_iso_mode,
|
live_iso_mode=results.live_iso_mode,
|
||||||
image=results.image,
|
image=results.image,
|
||||||
compose_dir_is_here=results.local_compose,
|
compose_dir_is_here=results.local_compose,
|
||||||
|
peridot=results.peridot,
|
||||||
hashed=results.hashed,
|
hashed=results.hashed,
|
||||||
justcopyit=results.just_copy_it,
|
justcopyit=results.just_copy_it,
|
||||||
force_build=results.force_build,
|
force_build=results.force_build,
|
||||||
|
@ -17,11 +17,7 @@ cd /builddir
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ git_clone }}
|
{{ git_clone }}
|
||||||
if [ -d "/builddir/ks/live/{{ major }}/{{ arch }}/peridot" ]; then
|
pushd /builddir/ks/live/{{ major }}/{{ arch }}/{{ kloc }} || { echo "Could not change directory"; exit 1; }
|
||||||
pushd /builddir/ks/live/{{ major }}/{{ arch }}/peridot || { echo "Could not change directory"; exit 1; }
|
|
||||||
else
|
|
||||||
pushd /builddir/ks/live/{{ major }}/{{ arch }}/stage || { echo "Could not change directory"; exit 1; }
|
|
||||||
fi
|
|
||||||
ksflatten -c {{ ks_file }} -o /builddir/ks.cfg
|
ksflatten -c {{ ks_file }} -o /builddir/ks.cfg
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Error flattening kickstart"
|
echo "Error flattening kickstart"
|
||||||
|
@ -1583,6 +1583,7 @@ class LiveBuild:
|
|||||||
force_build: bool = False,
|
force_build: bool = False,
|
||||||
updated_image: bool = False,
|
updated_image: bool = False,
|
||||||
image_increment: str = '0',
|
image_increment: str = '0',
|
||||||
|
peridot: bool = False,
|
||||||
logger=None
|
logger=None
|
||||||
):
|
):
|
||||||
|
|
||||||
@ -1610,6 +1611,7 @@ class LiveBuild:
|
|||||||
self.checksum = rlvars['checksum']
|
self.checksum = rlvars['checksum']
|
||||||
self.profile = rlvars['profile']
|
self.profile = rlvars['profile']
|
||||||
self.hashed = hashed
|
self.hashed = hashed
|
||||||
|
self.peridot = peridot
|
||||||
|
|
||||||
# Relevant major version items
|
# Relevant major version items
|
||||||
self.arch = config['arch']
|
self.arch = config['arch']
|
||||||
@ -1763,6 +1765,9 @@ class LiveBuild:
|
|||||||
mock_iso_template = self.tmplenv.get_template('isomock.tmpl.cfg')
|
mock_iso_template = self.tmplenv.get_template('isomock.tmpl.cfg')
|
||||||
mock_sh_template = self.tmplenv.get_template('liveisobuild.tmpl.sh')
|
mock_sh_template = self.tmplenv.get_template('liveisobuild.tmpl.sh')
|
||||||
iso_template = self.tmplenv.get_template('buildLiveImage.tmpl.sh')
|
iso_template = self.tmplenv.get_template('buildLiveImage.tmpl.sh')
|
||||||
|
kloc = 'stage'
|
||||||
|
if self.peridot:
|
||||||
|
kloc = 'peridot'
|
||||||
|
|
||||||
mock_iso_path = '/var/tmp/live-{}.cfg'.format(self.major_version)
|
mock_iso_path = '/var/tmp/live-{}.cfg'.format(self.major_version)
|
||||||
mock_sh_path = '{}/liveisobuild-{}-{}.sh'.format(
|
mock_sh_path = '{}/liveisobuild-{}-{}.sh'.format(
|
||||||
@ -1866,6 +1871,7 @@ class LiveBuild:
|
|||||||
major=self.major_version,
|
major=self.major_version,
|
||||||
git_clone=git_clone_cmd,
|
git_clone=git_clone_cmd,
|
||||||
ks_file=ks_start,
|
ks_file=ks_start,
|
||||||
|
kloc=kloc,
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(mock_iso_path, "w+") as mip:
|
with open(mock_iso_path, "w+") as mip:
|
||||||
|
Loading…
Reference in New Issue
Block a user