godep: vendor all dependencies & add circle-test.sh

Vendor dependencies and use circle-test.sh to run CI process, because
the CircleCI autobuild operations are not compatible with using godep.
This commit is contained in:
Cameron Sparr
2015-08-17 10:30:35 -06:00
parent 55fb249f6b
commit 4e3213f3bd
1055 changed files with 258568 additions and 44 deletions

View File

@@ -1,29 +1,8 @@
dependencies:
post:
# install rpm & fpm for packaging
- which rpmbuild || sudo apt-get install rpm
- gem install fpm
# install golint
- go get github.com/golang/lint/golint
# install gox
- go get -u -f github.com/mitchellh/gox
override:
- echo "Dummy override, so no Circle dependencies execute"
test:
pre:
# install binaries
- go install ./...
# Go fmt should pass all files
- "[ `git ls-files | grep '.go$' | xargs gofmt -l | tee /tmp/foo | wc -l` -eq 0 ] || (cat /tmp/foo; exit 1)"
- go vet ./...
- "[ `golint . | tee /tmp/foo | wc -l` == 0 ] || (cat /tmp/foo; exit 1)"
- "[ `golint testutil/... | tee /tmp/foo | wc -l` == 0 ] || (cat /tmp/foo; exit 1)"
- "[ `golint cmd/... | tee /tmp/foo | wc -l` == 0 ] || (cat /tmp/foo; exit 1)"
override:
- make test-short
post:
# Build linux binaries
- gox -os="linux" -arch="386 amd64" ./...
- mv telegraf* $CIRCLE_ARTIFACTS
# Build .deb and .rpm files
- "GOPATH=/home/ubuntu/.go_project ./package.sh `git rev-parse --short HEAD`"
- mv telegraf*{deb,rpm} $CIRCLE_ARTIFACTS
- bash circle-test.sh