-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use pack CLI to build on GCB #3503
Conversation
Codecov Report
|
examples/buildpacks/Dockerfile
Outdated
FROM alpine:3.10 | ||
ENV PACK_VERSION 0.6.0 | ||
ENV PACK_URL https://github.com/buildpack/pack/releases/download/v${PACK_VERSION}/pack-v${PACK_VERSION}-linux.tgz | ||
RUN wget -O pack.tgz "${PACK_URL}" | ||
RUN tar -zxf pack.tgz | ||
RUN mv pack /usr/local/bin |
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.
This file seems to be here in error
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.
Let me fix that
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.
LGTM except for 2 nits.
@@ -62,6 +62,7 @@ const ( | |||
DefaultCloudBuildMavenImage = "gcr.io/cloud-builders/mvn" | |||
DefaultCloudBuildGradleImage = "gcr.io/cloud-builders/gradle" | |||
DefaultCloudBuildKanikoImage = "gcr.io/kaniko-project/executor" | |||
DefaultCloudBuildPackImage = "gcr.io/k8s-skaffold/pack" |
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.
nit: can we move this gcb/buildpacks.go as a local constant if there are cyclic dependencies issues?
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'll move all those default image names next to where they are used in another PR
deploy/buildpacks/publish.sh
Outdated
|
||
set -e | ||
|
||
PACK_VERSION=0.6.0 |
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.
usually, folks end up copying the version string from pack --version
output
~/Downloads/pack --version
v0.6.0 (git sha: 109b629d388cec0ed3836b9fed6717727a9187c1)
tejaldesai-macbookpro2:~ tejaldesai$
Do you want to add the prefix v
to the version number?
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.
Also follow the same v0.0.6
version convention for the skaffold gcb pack image tag?
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'm fixing that. Thank you!
|
||
docker build . --build-arg PACK_VERSION=${PACK_VERSION} -t gcr.io/k8s-skaffold/pack:${PACK_VERSION} -t gcr.io/k8s-skaffold/pack:latest | ||
docker push gcr.io/k8s-skaffold/pack:${PACK_VERSION} | ||
docker push gcr.io/k8s-skaffold/pack:latest |
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.
Does heroku publish a container image that we can re-use or any plans in future to do so? Or else, skaffold team will have to keep the track of publishing the new image everytime pack is upgraded (which is fine for now)
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 haven't seen such plan.
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: David Gageot <david@gageot.net>
Instead of using our own implementation of the Buildpacks lifecycle, it's more robust to use
pack
CLI.