mirror of https://github.com/docker/docs.git
Merge pull request #2124 from vieux/vendor
move dependencies to vendor/
This commit is contained in:
commit
a4dda5bc97
|
@ -9,18 +9,16 @@ sudo: false
|
|||
install:
|
||||
# Symlink below is needed for Travis CI to work correctly on personal forks of swarm
|
||||
- ln -s $HOME/gopath/src/github.com/${TRAVIS_REPO_SLUG///swarm/} $HOME/gopath/src/github.com/docker
|
||||
- export GOPATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace:$GOPATH
|
||||
- export PATH=${TRAVIS_BUILD_DIR}/Godeps/_workspace/bin:$PATH
|
||||
- go get github.com/golang/lint/golint
|
||||
- go get github.com/GeertJohan/fgt
|
||||
|
||||
script:
|
||||
- script/validate-gofmt
|
||||
- go vet ./...
|
||||
- fgt golint ./...
|
||||
- go vet `go list ./... | grep -v /vendor/`
|
||||
- fgt golint ./... | grep -v vendor/ | tee /dev/stderr
|
||||
# Lint shell files and make sure they are not space indented.
|
||||
- fgt find test/ -type f \( -name "*.sh" -or -name "*.bash" -or -name "*.bats" \) -exec grep -Hn -e "^ " {} \;
|
||||
- GOOS=darwin go build
|
||||
- GOOS=windows go build
|
||||
- GOOS=linux go build
|
||||
- go test -v -race ./...
|
||||
- go test -v -race `go list ./... | grep -v /vendor/`
|
||||
|
|
|
@ -40,6 +40,7 @@ mkdir ~/gocode # any name is fine
|
|||
|
||||
Add these to your `.bashrc`:
|
||||
```sh
|
||||
export GO15VENDOREXPERIMENT=1 # only required for go 1.5.x
|
||||
export GOROOT=/usr/local/go
|
||||
export GOPATH=~/gocode
|
||||
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
|
||||
|
@ -118,7 +119,7 @@ Build the binary, installing it to `$GOPATH/bin/swarm`:
|
|||
|
||||
```sh
|
||||
cd $GOPATH/src/github.com/docker/swarm
|
||||
godep go install .
|
||||
go install .
|
||||
```
|
||||
|
||||
Run the binary you just created:
|
||||
|
@ -154,7 +155,7 @@ For complete documentation on how to use Swarm, refer to the Swarm section of [d
|
|||
To run unit tests:
|
||||
|
||||
```sh
|
||||
godep go test -race ./...
|
||||
go test -race ./...
|
||||
```
|
||||
|
||||
To run integration tests:
|
||||
|
@ -228,7 +229,7 @@ git diff # check what added or removed in Godep/Godeps.json
|
|||
To make sure you newly added codes will make the build process happy, you can try building Swarm in the same way as defined in `Dockerfile`.
|
||||
|
||||
```sh
|
||||
$GOBIN/godep go install
|
||||
go install
|
||||
```
|
||||
Then you should find the `swarm` binary under the `$GOBIN` directory.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
source "$(dirname "$BASH_SOURCE")/.validate"
|
||||
|
||||
IFS=$'\n'
|
||||
files=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^Godeps/' || true) )
|
||||
files=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^vendor/' || true) )
|
||||
unset IFS
|
||||
|
||||
badFiles=()
|
||||
|
|
|
@ -13,9 +13,6 @@ RUN curl -sSL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.
|
|||
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
||||
ENV GOPATH /go
|
||||
|
||||
# Go dependencies
|
||||
RUN go get github.com/tools/godep
|
||||
|
||||
# install bats
|
||||
RUN cd /usr/local/src/ \
|
||||
&& git clone https://github.com/sstephenson/bats.git \
|
||||
|
@ -24,6 +21,5 @@ RUN cd /usr/local/src/ \
|
|||
|
||||
RUN mkdir -p /go/src/github.com/docker/swarm
|
||||
WORKDIR /go/src/github.com/docker/swarm/test/integration
|
||||
ENV GOPATH /go/src/github.com/docker/swarm/Godeps/_workspace:$GOPATH
|
||||
|
||||
ENTRYPOINT ["/dind"]
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue