-
Notifications
You must be signed in to change notification settings - Fork 294
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
Lifecycle image #1130
Lifecycle image #1130
Conversation
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.
Overall, this is really great! I'm split about what to do with the previous
case though, I think we should support it...
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Natalie Arellano <narellano@vmware.com>
0cfff69
to
466fd8b
Compare
Signed-off-by: Natalie Arellano <narellano@vmware.com>
| PACK_PATH | Path to a `pack` executable. | A compiled version of the current branch | | ||
| PREVIOUS_PACK_PATH | Path to a `pack` executable, used to test compatibility with n-1 version of `pack` | The most recent release from `pack`'s Github release | | ||
| PREVIOUS_PACK_FIXTURES_PATH | Path to a set of fixtures, used to override the most up-to-date fixtures, in case of changed functionality | `acceptance/testdata/pack_previous_fixtures_overrides` | |
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.
Sorted alphabetically...
compilePackWithVersion: compilePackWithVersion, | ||
githubToken: githubToken, |
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.
It seems fine to inline these.
envPackPath = "PACK_PATH" | ||
envPreviousPackPath = "PREVIOUS_PACK_PATH" | ||
envPreviousPackFixturesPath = "PREVIOUS_PACK_FIXTURES_PATH" | ||
envLifecyclePath = "LIFECYCLE_PATH" | ||
envPreviousLifecyclePath = "PREVIOUS_LIFECYCLE_PATH" | ||
envGitHubToken = "GITHUB_TOKEN" |
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.
Sorted again...
Signed-off-by: Natalie Arellano <narellano@vmware.com>
Always assign a valid lifecycle image if possible, so that we could clean it up Signed-off-by: Natalie Arellano <narellano@vmware.com>
Alright I think I'm happy with it. Copying the results of some manual validation: When lifecycle tgz contains a lifecycle that isn't on buildpacksio/lifecycle, it fails
When lifecycle tgz contains a lifecycle that isn't on buildpacksio/lifecycle, BUT you provide the lifecycle image, it succeeds
|
previousLifecycleImage := b.inputConfig.previousLifecycleImage | ||
|
||
if previousLifecycleImage == "" { | ||
previousLifecycleImage = fmt.Sprintf("%s:%s", config.DefaultLifecycleImageRepo, lifecycle.Descriptor().Info.Version) |
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.
opt.semgrep.sprintf-host-port: Use net.JoinHostPort
instead of fmt.Sprintf(config.DefaultLifecycleImageRepo, lifecycle.Descriptor().Info.Version)
. When using IPv6, JoinHostPort
continues to operate properly.
(at-me in a reply with help
or ignore
)
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.
@Muse-Dev ignore
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've recorded this as ignored for this pull request. If you change your mind, just comment @muse-dev unignore
.
Same validation for previous: When previous lifecycle tgz contains a lifecycle that isn't on buildpacksio/lifecycle, it fails
When previous lifecycle tgz contains a lifecycle that isn't on buildpacksio/lifecycle, BUT you provide the previous lifecycle image, it succeeds
|
Summary
Resolves #1105