build: T3664: add an option to specify artifact extensions #768
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Summary
Add
artifact_format
option that allows the user to specify what to consider artifacts.Types of changes
Component(s) name
Build scripts.
Proposed changes
Right now, the
artifacts
field inmanifest.json
includes everything that is produced during the build process. That's not an optimal solution because the build for non-ISO formats is multi-stage and a lot of the time intermediate objects have no value for the flavor.For example, Hyper-V images are built using the following sequence:
iso → raw → vhdx
. The raw image from that sequence is useless because Hyper-V doesn't natively support raw images, the ISO is useless because the generic ISO already includes a guest agent for Hyper-V. Thus when a Hyper-V image is build by a release pipeline, the pipeline should only pick up the.vhdx
image.This PR introduces two changes:
artifact_format
. For example,artifact_format = "ova"
orartifact_format = ["iso", "xva"]
.image_format
are artifacts, so build withimage_format = "raw"
do not include the ISO in the manifest.Thus it's easy to automate artifact upload — the script only needs to read the
artifacts
field, no need to guess which files to pick.Checklist: