stages/ostree.deploy: add remote option

Add an optional `remote` to the deployment of the ostree so that
the it is tied to the specified remote. This is needed later for
updating the commit from that remote.
This commit is contained in:
Christian Kellner 2021-08-27 11:20:53 +02:00 committed by Tom Gundersen
parent 7ea9796d9b
commit c788a74fb5
3 changed files with 10 additions and 0 deletions

View file

@ -54,6 +54,10 @@ SCHEMA = """
"description": "OStree ref to use for the deployment",
"type": "string"
},
"remote": {
"description": "optional OStree remote to use for the deployment",
"type": "string"
},
"rootfs": {
"description": "Identifier to locate the root file system",
"type": "object",
@ -136,6 +140,10 @@ def main(tree, options):
mounts = options.get("mounts", [])
kopts = options.get("kernel_opts", [])
ref = options["ref"]
remote = options.get("remote")
if remote:
ref = f"{remote}:{ref}"
kargs = []

View file

@ -861,6 +861,7 @@
"options": {
"osname": "fedora",
"ref": "fedora/x86_64/osbuild",
"remote": "osbuild",
"mounts": [
"/boot",
"/boot/efi"

View file

@ -301,6 +301,7 @@
"options": {
"osname": "fedora",
"ref": "fedora/x86_64/osbuild",
"remote": "osbuild",
"mounts": [
"/boot",
"/boot/efi"