generate-release-meta: Support overriding release name
The command currently derives the cosa branch to determine
the release stream ID; for RHCOS we have `HEAD` there.
Support overriding it.
@@ -35,6 +35,7 @@ def get_extension(path, modifier, arch):
parser = ArgumentParser()
parser.add_argument("--workdir", help="cosa workdir")
parser.add_argument("--build-id", help="build id")
+parser.add_argument("--stream-name", help="Override the stream ID (default is derived from coreos-assembler)")
parser.add_argument("--stream-baseurl", help="Prefix URL for stream content", default="https://builds.coreos.fedoraproject.org/prod/streams")
parser.add_argument("--output", help="Output to file; default is build directory")
parser.add_argument("url", metavar='URL', help="URL to a coreos-assembler meta.json", default=[], nargs='*')
@@ -89,7 +90,12 @@ def append_build(out, input_):
arch = input_.get("coreos-assembler.basearch")
ensure_dup(input_, out, "buildid", "release")
- ensure_dup(input_.get('coreos-assembler.container-config-git'), out, 'branch', 'stream')
+ streamnamesrc = None
+ if args.stream_name:
+ streamnamesrc = {'branch': args.stream_name}
+ else:
+ streamnamesrc = input_.get('coreos-assembler.container-config-git')
+ ensure_dup(streamnamesrc, out, 'branch', 'stream')
def artifact(i):
base_url = url_builder(out.get('stream'), out.get('release'), arch, i.get('path'))
