Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: T3664: add an option to specify artifact extensions #768

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

dmbaturin
Copy link
Member

@dmbaturin dmbaturin commented Sep 19, 2024

Change Summary

Add artifact_format option that allows the user to specify what to consider artifacts.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Component(s) name

Build scripts.

Proposed changes

Right now, the artifacts field in manifest.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:

  • First, it adds a new option artifact_format. For example, artifact_format = "ova" or artifact_format = ["iso", "xva"].
  • Second, if that option is not specified, it assumes that extensions from image_format are artifacts, so build with image_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:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Copy link

github-actions bot commented Sep 19, 2024

👍
No issues in PR Title / Commit Title

so that the manifest only contains files considered build artifacts,
and those artifacts can be automatically picked up by CI jobs and the like
@sever-sever sever-sever merged commit 3f57943 into vyos:current Sep 20, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants