-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #584 from weaveworks/535-vendor
Build in a container, use go1.5, vendor Dependancies, build for Darwin and Arm on Circle.
- Loading branch information
Showing
2,599 changed files
with
766,493 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
FROM golang:1.5.1 | ||
ENV GO15VENDOREXPERIMENT 1 | ||
RUN apt-get update && apt-get install -y libpcap-dev | ||
COPY build.bash / | ||
|
||
COPY build.sh / | ||
ENTRYPOINT ["/build.sh"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
|
||
# Mount the scope repo: | ||
# -v $(pwd):/go/src/github.com/weaveworks/scope | ||
|
||
cd $GOPATH/src/github.com/weaveworks/scope | ||
rm $1 2>/dev/null || true | ||
make BUILD_IN_CONTAINER=false $@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cover/cover | ||
socks/proxy | ||
socks/image.tar | ||
runner/runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Weaveworks Build Tools | ||
|
||
Included in this repo are tools shared by weave.git and scope.git. They include | ||
|
||
- ```cover```: a tool which merges overlapping coverage reports generated by go | ||
test | ||
- ```lint```: a script to lint Go project; runs various tools like golint, go | ||
vet, errcheck etc | ||
- ```rebuild-image```: a script to rebuild docker images when their input files | ||
change; useful when you using docker images to build your software, but you | ||
don't want to build the image every time. | ||
- ```socks```: a simple, dockerised SOCKS proxy for getting your laptop onto | ||
the Weave network | ||
- ```test```: a script to run all go unit tests in subdirectories, gather the | ||
coverage results, and merge them into a single report. | ||
- ```runner```: a tool for running tests in parallel; given each test is | ||
suffixed with the number of hosts it requires, and the hosts available are | ||
contained in the environment variable HOSTS, the tool will run tests in | ||
parallel, on different hosts. | ||
|
||
## Using build-tools.git | ||
|
||
To allow you to tie your code to a specific version of build-tools.git, such | ||
that future changes don't break you, we recommendation that you [`git subtree`]() | ||
this repository into your own repository: | ||
|
||
[`git subtree`]: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ | ||
|
||
``` | ||
git subtree add --prefix tools https://github.com/weaveworks/build-tools.git master --squash | ||
```` | ||
To update the code in build-tools.git, the process is therefore: | ||
- PR into build-tools.git, go through normal review process etc. | ||
- Do `git subtree pull --prefix tools https://github.com/weaveworks/build-tools.git master --squash` | ||
in your repo, and PR that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
machine: | ||
services: | ||
- docker | ||
environment: | ||
GOPATH: /home/ubuntu | ||
SRCDIR: /home/ubuntu/src/github.com/weaveworks/tools | ||
PATH: $PATH:$HOME/bin | ||
|
||
dependencies: | ||
post: | ||
- go clean -i net | ||
- go install -tags netgo std | ||
- mkdir -p $(dirname $SRCDIR) | ||
- cp -r $(pwd)/ $SRCDIR | ||
- go get github.com/golang/lint/golint github.com/fzipp/gocyclo github.com/kisielk/errcheck | ||
|
||
test: | ||
override: | ||
- cd $SRCDIR; ./lint . | ||
- cd $SRCDIR/cover; make | ||
- cd $SRCDIR/socks; make | ||
- cd $SRCDIR/runner; make | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.PHONY: all clean | ||
|
||
all: cover | ||
|
||
cover: *.go | ||
go get -tags netgo ./$(@D) | ||
go build -ldflags "-extldflags \"-static\" -linkmode=external" -tags netgo -o $@ ./$(@D) | ||
|
||
clean: | ||
rm -rf cover | ||
go clean ./... |
Oops, something went wrong.