Skip to content
Permalink
Browse files

Migrate go modules from glide

  • Loading branch information...
s1061123 committed Jun 7, 2019
1 parent df58b74 commit de1c1c78e9eed844c5a2b9aca32dc6572752b20a
Showing 17,633 changed files with 155 additions and 5,049,009 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
@@ -5,13 +5,13 @@ language: go
dist: trusty

go:
- 1.11.x
- 1.12.x

env:
global:
- GO111MODULE=on
- REGISTRY_USER=${REGISTRY_USER}
- REGISTRY_PASS=${REGISTRY_PASS}
- MULTUS_GOPATH=${PWD}/gopath
- secure: "${REGISTRY_SECURE}"

before_install:
@@ -23,26 +23,18 @@ install:

before_script:
# Make gopath... to run golint/go fmt/go vet
- |-
if [ ! -h gopath/src/github.com/intel/multus-cni ]; then
mkdir -p gopath/src/github.com/intel
ln -s ../../../.. gopath/src/github.com/intel/multus-cni || exit 255
fi
- env GOPATH=${MULTUS_GOPATH} golint gopath/src/github.com/intel/multus-cni/multus/... | grep -v ALL_CAPS | xargs -r false
- env GOPATH=${MULTUS_GOPATH} go fmt gopath/src/github.com/intel/multus-cni/...
- go tool vet */*.go
# Suppress golint for fixing lint later.
#- golint ... | grep -v ALL_CAPS | xargs -r false
- go fmt ./...
- go vet ./...
# - gocyclo -over 15 ./multus

script:
- ./build
- sudo ./test.sh
- |-
GOV_GOPATH=${PWD}/gopath
pushd gopath/src/github.com/intel/multus-cni
env GOPATH=${GOV_GOPATH} ${GOPATH}/bin/goveralls -coverprofile=coverage.out -service=travis-ci
popd
- sudo env PATH=${PATH} ./test.sh
- goveralls -coverprofile=coverage.out -service=travis-ci
- mkdir -p ${TRAVIS_BUILD_DIR}/dist
- tar cvfz ${TRAVIS_BUILD_DIR}/dist/multus-cni_amd64.tar.gz --warning=no-file-changed --exclude="dist" --exclude="vendor" .
- tar cvfz ${TRAVIS_BUILD_DIR}/dist/multus-cni_amd64.tar.gz --warning=no-file-changed --exclude="dist" .
- docker build -t nfvpe/multus .

deploy:
18 build
@@ -1,8 +1,11 @@
#!/usr/bin/env bash
set -e

ORG_PATH="github.com/intel"
REPO_PATH="${ORG_PATH}/multus-cni"
DEST_DIR="bin"

if [ ! -d ${DEST_DIR} ]; then
mkdir ${DEST_DIR}
fi

# Add version/commit/date into binary
# In case of TravisCI, need to check error code of 'git describe'.
@@ -18,15 +21,8 @@ DATE=$(date --iso-8601=seconds)
COMMIT=$(git rev-parse --verify HEAD)
LDFLAGS="-X main.version=${VERSION:-master} -X main.commit=${COMMIT} -X main.date=${DATE}"

if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi

export GO15VENDOREXPERIMENT=1
export GOBIN=${PWD}/bin
export GOPATH=${PWD}/gopath
export GO111MODULE=on
export CGO_ENABLED=0

echo "Building plugins"
go install -tags no_openssl -ldflags "${LDFLAGS}" "$@" ${REPO_PATH}/multus
go build -o ${DEST_DIR}/multus -tags no_openssl -ldflags "${LDFLAGS}" "$@" ./multus

This file was deleted.

0 comments on commit de1c1c7

Please sign in to comment.
You can’t perform that action at this time.