diff options
author | Christian Breunig <christian@breunig.cc> | 2024-08-26 20:53:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-26 20:53:33 +0200 |
commit | 013e4d5dc9472c6ea48a8f6e175d1cf9d4ca13d5 (patch) | |
tree | 9fcffcb3b6d470d0500cf85f8a74b73b349c1957 /scripts/image-build/build-vyos-image | |
parent | 70bb3c5baacb6e0c72b9532f6dda417d395a6bc0 (diff) | |
parent | 9928925b3b34e4a42099781430a0063292a9d0fe (diff) | |
download | vyos-build-013e4d5dc9472c6ea48a8f6e175d1cf9d4ca13d5.tar.gz vyos-build-013e4d5dc9472c6ea48a8f6e175d1cf9d4ca13d5.zip |
Merge pull request #736 from c-po/artifacts-T6653
build: T6653: add build/manifest.json file
Diffstat (limited to 'scripts/image-build/build-vyos-image')
-rwxr-xr-x | scripts/image-build/build-vyos-image | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index 44ce2d5f..c13d7607 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -549,6 +549,13 @@ if __name__ == "__main__": with open(file_path, 'w') as f: f.write(build_config["default_config"]) + ## Initialize build manifest + manifest = { + 'build_config' : build_config, + 'artifacts' : [iso_file], + 'pre_build_config' : pre_build_config + } + ## Configure live-build lb_config_tmpl = jinja2.Template(""" lb config noauto \ @@ -627,6 +634,7 @@ Pin-Priority: 600 # if the flavor calls for them if build_config["image_format"] != ["iso"]: raw_image = raw_image.create_raw_image(build_config, iso_file, "tmp/") + manifest['artifacts'].append(raw_image) if has_nonempty_key(build_config, "post_build_hook"): # Some flavors require special procedures that aren't covered by qemu-img @@ -644,3 +652,7 @@ Pin-Priority: 600 target = f"{os.path.splitext(raw_image)[0]}.{image_ext}" print(f"I: Building {f} file {target}") cmd(f"qemu-img convert -f raw -O {f} {image_opts} {raw_image} {target}") + manifest['artifacts'].append(target) + + with open('manifest.json', 'w') as f: + f.write(json.dumps(manifest)) |