pxrecipe: Add the push artifact and resolve the build tag in recipes before rendering - #12
Open
bensallen wants to merge 1 commit into
Open
pxrecipe: Add the push artifact and resolve the build tag in recipes before rendering#12bensallen wants to merge 1 commit into
bensallen wants to merge 1 commit into
Conversation
…before rendering
Add a `push` artifact that commits the working container and pushes it
to a registry with `buildah push`. A bare string is the destination
registry or a map accepts `registry`, `image`, `tag`, and
`format`. `image` and `tag` default to the recipe name and build tag.
The push `tag` argument takes either a single tag or a list of tags.
The build tag is now resolved in Recipe.__init__ instead of in
build(), making it available as {{tag}} when the recipe is rendered.
It can now be used anywhere in a recipe, including artifact filenames
and push tags.
`show` grows the same --tag flag so a recipe using {{tag}} can be inspected.
The default tag moves to a module level default_tag() and is cached, so merged
sub-recipes share one tag and git is only consulted once.
With the tag known up front, the osrelease step no longer
needs placeholders in `show` output and render real values.
Also in osrelease, if specifying a IMAGE_ID or IMAGE_VERSION override
in the recipe it is now explicitly ignored with a warning. Matches
previous behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a
pushartifact that commits the working container and pushes it to a registry withbuildah push. A bare string sets the destination registry or a map acceptsregistry,image,tag, andformat.imageandtagdefault to the recipe name and build tag. The pushtagargument takes either a single tag or a list of tags.The build tag is now resolved in Recipe.init instead of in build(), making it available as {{tag}} when the recipe is rendered. It can now be used anywhere in a recipe, including artifact filenames and push tags.
showadds the same --tag flag so a recipe using {{tag}} can be inspected. The default tag moves to a module level default_tag() and is cached, so merged sub-recipes share one tag and git is only consulted once.With the tag known up front, the osrelease step no longer needs placeholders in
showoutput and render real values.Also in osrelease, if specifying a IMAGE_ID or IMAGE_VERSION override in the recipe it is now explicitly ignored with a warning. Matches previous behavior.