Skip to content

Commit b8902d0

Browse files
authored
Merge pull request #97 from OSInside/hand_over_kiwi_file_option
Hand over --kiwi-file option
2 parents ad56f2f + 7565663 commit b8902d0

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

kiwi_boxed_plugin/tasks/system_boxbuild.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ def _validate_kiwi_build_command(self) -> List[str]:
260260
for profile in sorted(set(self.global_args.get('--profile'))):
261261
final_kiwi_build_command.append('--profile')
262262
final_kiwi_build_command.append(profile)
263+
if self.global_args.get('--kiwi-file'):
264+
final_kiwi_build_command.append('--kiwi-file')
265+
final_kiwi_build_command.append(self.global_args.get('--kiwi-file'))
263266
final_kiwi_build_command += kiwi_build_command
264267
log.info(
265268
'Building with:{0} {1}'.format(

test/unit/tasks/system_boxbuild_test.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ class TestSystemBoxbuildTask:
1010
def setup(self):
1111
sys.argv = [
1212
sys.argv[0],
13-
'--debug', '--profile', 'foo', '--type', 'oem',
13+
'--debug',
14+
'--profile', 'foo',
15+
'--type', 'oem',
16+
'--kiwi-file', 'appliance.kiwi',
1417
'system', 'boxbuild',
1518
'--box', 'universal',
1619
'--box-memory', '4',
@@ -84,7 +87,10 @@ def test_process_system_boxbuild_container(self, mock_BoxContainerBuild):
8487
)
8588
box_containerbuild.run.assert_called_once_with(
8689
[
87-
'--debug', '--type', 'oem', '--profile', 'foo',
90+
'--debug',
91+
'--type', 'oem',
92+
'--profile', 'foo',
93+
'--kiwi-file', 'appliance.kiwi',
8894
'system', 'build',
8995
'--description', 'foo', '--target-dir', 'xxx',
9096
'--allow-existing-root',
@@ -107,7 +113,10 @@ def test_process_system_boxbuild(self, mock_BoxBuild):
107113
)
108114
box_build.run.assert_called_once_with(
109115
[
110-
'--debug', '--type', 'oem', '--profile', 'foo',
116+
'--debug',
117+
'--type', 'oem',
118+
'--profile', 'foo',
119+
'--kiwi-file', 'appliance.kiwi',
111120
'system', 'build',
112121
'--description', 'foo', '--target-dir', 'xxx',
113122
'--allow-existing-root',

0 commit comments

Comments
 (0)