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

publish-kit: allow overridding image repository #372

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

cbgbt
Copy link
Contributor

@cbgbt cbgbt commented Sep 16, 2024

Description of changes:
This allows pushing new kits to a staging repository before copying the artifacts to a final destination.

Testing done:

  • built bottlerocket-core-kit
  • ran PUBLISH_REPO=cbgbt-test make publish after some modifications to the Makefile to take advantage of this change
  • 19:34:46 [INFO] Pushing kit image for platform aarch64 to public.ecr.aws/REDACTED/cbgbt-test:v2.5.0-cc1ca341-dirty-aarch64

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

This override keeps the kit metadata the same, but pushes the image to
an alternate repository.
@@ -41,11 +44,16 @@ impl PublishKit {
install_tools(&toolsdir).await?;
let makefile_path = toolsdir.join("Makefile.toml");

let publish_kit_repo = match &self.kit_repo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not be populating this from the Twoliter.override file vs an argument?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Twoliter.override file knows about dependencies, but not about resultant kits.

@cbgbt cbgbt merged commit d812e8f into bottlerocket-os:develop Sep 16, 2024
1 check passed
@cbgbt cbgbt deleted the publish-override branch September 16, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants