-
Notifications
You must be signed in to change notification settings - Fork 13
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
Amend update-builder
functionality
#342
Conversation
- If the run image is a version, we should update it to match the latest build image version, to keep the stack images in lockstep - The run image does not necessarily need to be set to `latest` or follow the legacy tagging convention we used in the Bionic stacks. - For more information on the "legacy tagging convention", see #81 - Add support for updating run image mirrors
I think that I am comfortable with this assumption as we do not currently market this as a tool we offer but do make it available and because I think that setting a specific run image version is something that is an oddity and will only be done in unique circumstance. |
if err != nil { | ||
return err | ||
} | ||
|
||
builder.Stack.BuildImage = fmt.Sprintf("%s:%s", buildImage.Name, buildImage.Version) | ||
if runImage != (internal.Image{}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the ()
necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need them when comparing an instantiation inline but that could be old news.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes they are necessary unfortunately. expected ';', found '{' (typecheck)
Summary
Allows the
jam update-builder
command to update the run image (and associated run image mirrors) if the run image tag is semantically versioned instead oflatest
. There are some use cases (such as not being able to publish tolatest
) that make this use case helpful. Prior to this change, this use case caused errors when executing.The PR makes the following choices:
If the run image tag is a semantic version (
x.y.z
orx.y.z-suffix
), we should update it to match the latest build image version, to keep the stack images in lockstep. This assumes the run/build images of a stack are versioned and released together. I think this is simpler than re-calculating the highest tag version available twice, once for build and once for run.If the builder.toml file has run image mirrors present, update them to the same version as the build/run image if the run image has been updated
Continue to support the "legacy tagging convention" in which tags may have a suffix (like
-cnb
), although none of our officially supported Paketo stack images use this mechanism, seeFind latest stack images in semver-tagged repos #81
Checklist