Merge pull request #4 from containernetworking/plugins-travis
travis integration
This commit is contained in:
commit
c44a76ddd3
41
.travis.yml
Normal file
41
.travis.yml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
language: go
|
||||||
|
sudo: required
|
||||||
|
dist: trusty
|
||||||
|
|
||||||
|
go:
|
||||||
|
- 1.7.x
|
||||||
|
- 1.8.x
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- PATH=$GOROOT/bin:$PATH
|
||||||
|
matrix:
|
||||||
|
- TARGET=amd64
|
||||||
|
- TARGET=arm
|
||||||
|
- TARGET=arm64
|
||||||
|
- TARGET=ppc64le
|
||||||
|
- TARGET=s390x
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
|
install:
|
||||||
|
- |
|
||||||
|
go get github.com/containernetworking/cni || true
|
||||||
|
pushd ../cni
|
||||||
|
GOARCH="${TARGET}" ./build.sh
|
||||||
|
popd
|
||||||
|
|
||||||
|
script:
|
||||||
|
- |
|
||||||
|
if [ "${TARGET}" == "amd64" ]; then
|
||||||
|
CNI_PATH="$(cd ../cni/bin && pwd)" GOARCH="${TARGET}" ./test
|
||||||
|
else
|
||||||
|
GOARCH="${TARGET}" ./build
|
||||||
|
fi
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 9999999
|
10
build
10
build
@ -12,15 +12,15 @@ fi
|
|||||||
export GO15VENDOREXPERIMENT=1
|
export GO15VENDOREXPERIMENT=1
|
||||||
export GOPATH=${PWD}/gopath
|
export GOPATH=${PWD}/gopath
|
||||||
|
|
||||||
mkdir -p ${PWD}/bin
|
mkdir -p "${PWD}/bin"
|
||||||
|
|
||||||
echo "Building plugins"
|
echo "Building plugins"
|
||||||
PLUGINS="plugins/*"
|
PLUGINS="plugins/*"
|
||||||
for d in $PLUGINS; do
|
for d in $PLUGINS; do
|
||||||
if [ -d $d ]; then
|
if [ -d "$d" ]; then
|
||||||
plugin=$(basename $d)
|
plugin="$(basename "$d")"
|
||||||
echo " " $plugin
|
echo " $plugin"
|
||||||
# use go install so we don't duplicate work
|
# use go install so we don't duplicate work
|
||||||
GOBIN=${PWD}/bin go install -pkgdir $GOPATH/pkg "$@" $REPO_PATH/$d
|
go build -o "${PWD}/bin/$plugin" -pkgdir "$GOPATH/pkg" "$@" "$REPO_PATH/$d"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user