-
Notifications
You must be signed in to change notification settings - Fork 433
Use build template #20
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
Conversation
This builds on #19, so we should merge that first |
I forgot about the issue in #10 - will have to think about it. DO NOT MERGE |
I think I can just install coreutils. Building now. |
For me tests fail as the git-sync location isn't changed within the test_e2e.sh. |
cd1026d
to
836e10b
Compare
Fixed. I'll also update the test to run the docker image. On Fri, Oct 28, 2016 at 9:14 AM, Michael Grosser notifications@github.com
|
ifeq ($(ARCH),amd64) | ||
docker tag $(IMAGE):$(TAG) $(LEGACY_AMD64_IMAGE):$(TAG) | ||
BASEIMAGE?=alpine |
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.
Should we really not version alpine here? Probably better to be explicit with
BASEIMAGE?=alpine:3.4
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.
done
Yeah coreutils would fix #10, but add ~6mb. Probably worth it considering shaving off almost 100 due to moving to alpine. |
a501a68
to
35c89d4
Compare
Test runs the docker image now. PTAL |
-v $$(pwd)/.go:/go \ | ||
-v $$(pwd):/go/src/$(PKG) \ | ||
-v $$(pwd)/bin/$(ARCH):/go/bin \ | ||
-v $$(pwd)/bin/$(ARCH):/go/bin/linux_$(ARCH) \ |
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 line seems unnecessary.
It is needed when building other architectures. I have a template Makefile On Fri, Oct 28, 2016 at 9:44 AM, Michael Grosser notifications@github.com
|
@docker build -t $(IMAGE):$(VERSION) -f .dockerfile-$(ARCH) . | ||
@docker images -q $(IMAGE):$(VERSION) > $@ | ||
@if [ "$(ARCH)" == "amd64" ]; then \ | ||
docker tag -f $(IMAGE):$(VERSION) $(LEGACY_IMAGE):$(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.
-f is deprecated and actually removed in docker 1.12. Just remove it for builds with docker 1.10+
my desktop is still 1.9 - I'll have to upgrade :) On Fri, Oct 28, 2016 at 10:07 AM, Michael Grosser notifications@github.com
|
hmm, no upgrade available from corp... On Fri, Oct 28, 2016 at 10:09 AM, Tim Hockin thockin@google.com wrote:
|
@@ -49,8 +49,15 @@ function assert_file_eq() { | |||
|
|||
# Build it | |||
echo "Building..." | |||
make >/dev/null | |||
GIT_SYNC=./bin/git-sync-amd64 | |||
make container REGISTRY=e2e TAG=$(make version) >/dev/null |
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.
For me the $(make version) is not silenced and therefore is assigned "Entering".
Would use $(make -s version) instead.
-i \ | ||
-u $(id -u):$(id -g) \ | ||
-v "$DIR":"$DIR" \ | ||
e2e/git-sync-amd64:$(make 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.
Same here. Would use $(make -s version) instead.
Faster builds and versions from tags. Also use alpine as a base image. We need alpine for other architectures... Also change the --wait flag to take a float for sub-second waits.
35c89d4
to
70feeb5
Compare
Fixed in new push, passes e2e. |
Awesome!! Please let me know when you push this to grc, I'll grab the tag (tried v2.0.3 already and nope) |
We'll have to wait for thockin on the push. But I assume this will happen soon. Will let you know. |
Pushed to GCR On Mon, Oct 31, 2016 at 12:37 PM, Michael Grosser notifications@github.com
|
Faster builds and versions from tags. Also use alpine as a base image. We need alpine for other architectures...
Fixes #10
This change is