Build in a container by default, using go 1.5 and vendored dependancies.

- Use submodules for vendoring.
- Don't go clean, now that everything is in .pkg.
- sudo -E as we need the environment variables.
- Install -race version of std so the tests can run without sudo.
- Cache the build image on circle, use the rebuild-image script from tools.
This commit is contained in:
Tom Wilkie committed 2016-01-13 04:40:18 -08:00
1 parent 6a103aef27
commit c098aefed9
26 files changed
+154 -196

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
FROM weaveworks/weave-build
COPY test.sh /
ENTRYPOINT ["sh", "/test.sh"]
-20
View File
@@ -1,20 +0,0 @@
#!/bin/sh
set -e
GOPATH=/home/go
export GOPATH
WEAVE_SRC=$GOPATH/src/github.com/weaveworks/weave
# If we run make directly, any files created on the bind mount
# will have awkward ownership. So we switch to a user with the
# same user and group IDs as source directory. We have to set a
# few things up so that sudo works without complaining later on.
uid=$(stat --format="%u" $WEAVE_SRC)
gid=$(stat --format="%g" $WEAVE_SRC)
echo "weave:x:$uid:$gid::$WEAVE_SRC:/bin/sh" >>/etc/passwd
echo "weave:*:::::::" >>/etc/shadow
echo "weave ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
su weave -c "PATH=$PATH make -C $WEAVE_SRC tests"