diff --git a/stages/org.osbuild.bootc.install-to-filesystem b/stages/org.osbuild.bootc.install-to-filesystem index fde611d3..6edcbf8f 100755 --- a/stages/org.osbuild.bootc.install-to-filesystem +++ b/stages/org.osbuild.bootc.install-to-filesystem @@ -40,6 +40,9 @@ def main(options, inputs, paths): # customize kernel-args for karg in options.get("kernel-args", []): pargs.extend(["--karg", karg]) + target_imgref = options.get("target-imgref") + if target_imgref: + pargs.extend(["--target-imgref", target_imgref]) # add target and go pargs.append(dst) subprocess.run(pargs, env=env, check=True) diff --git a/stages/org.osbuild.bootc.install-to-filesystem.meta.json b/stages/org.osbuild.bootc.install-to-filesystem.meta.json index db29e35d..f2367b52 100644 --- a/stages/org.osbuild.bootc.install-to-filesystem.meta.json +++ b/stages/org.osbuild.bootc.install-to-filesystem.meta.json @@ -40,6 +40,10 @@ "items": { "type": "string" } + }, + "target-imgref": { + "description": "Specify the image to fetch for subsequent updates", + "type": "string" } } }, diff --git a/stages/test/test_bootc_install_to_fs.py b/stages/test/test_bootc_install_to_fs.py index 36c53975..f31dc03e 100644 --- a/stages/test/test_bootc_install_to_fs.py +++ b/stages/test/test_bootc_install_to_fs.py @@ -53,9 +53,13 @@ FAKE_INPUTS = { ({"kernel-args": ["arg1", "arg2"]}, ["--karg", "arg1", "--karg", "arg2"]), # all ({"root-ssh-authorized-keys": ["key1", "key2"], - "kernel-args": ["arg1", "arg2"]}, + "kernel-args": ["arg1", "arg2"], + "target-imgref": "quay.io/img/ref", + }, ["--root-ssh-authorized-keys", "/tmp/fake-named-tmpfile-name", - "--karg", "arg1", "--karg", "arg2"], + "--karg", "arg1", "--karg", "arg2", + "--target-imgref", "quay.io/img/ref", + ], ), ]) @patch("subprocess.run")