mirror of https://github.com/k3s-io/k3s
Convert everything to use vendor/
parent
3c0c5ed4e0
commit
cbf886c7f4
2
Makefile
2
Makefile
|
@ -21,7 +21,6 @@
|
|||
# clean: Clean up.
|
||||
|
||||
OUT_DIR = _output
|
||||
GODEPS_PKG_DIR = Godeps/_workspace/pkg
|
||||
|
||||
KUBE_GOFLAGS = $(GOFLAGS)
|
||||
export KUBE_GOFLAGS
|
||||
|
@ -111,7 +110,6 @@ test_e2e_node:
|
|||
clean:
|
||||
build/make-clean.sh
|
||||
rm -rf $(OUT_DIR)
|
||||
rm -rf $(GODEPS_PKG_DIR)
|
||||
.PHONY: clean
|
||||
|
||||
# Run 'go vet'.
|
||||
|
|
|
@ -77,13 +77,10 @@ readonly DOCKER_MOUNT_ARGS_BASE=(
|
|||
--volume /etc/localtime:/etc/localtime:ro
|
||||
)
|
||||
|
||||
# We create a Docker data container to cache incremental build artifacts. We
|
||||
# need to cache both the go tree in _output and the go tree under Godeps.
|
||||
# We create a Docker data container to cache incremental build artifacts.
|
||||
readonly REMOTE_OUTPUT_GOPATH="${REMOTE_OUTPUT_SUBPATH}/go"
|
||||
readonly REMOTE_GODEP_GOPATH="/go/src/${KUBE_GO_PACKAGE}/Godeps/_workspace/pkg"
|
||||
readonly DOCKER_DATA_MOUNT_ARGS=(
|
||||
--volume "${REMOTE_OUTPUT_GOPATH}"
|
||||
--volume "${REMOTE_GODEP_GOPATH}"
|
||||
)
|
||||
|
||||
# This is where the final release artifacts are created locally
|
||||
|
@ -465,7 +462,6 @@ function kube::build::source_targets() {
|
|||
docs
|
||||
examples
|
||||
federation
|
||||
Godeps/_workspace/src
|
||||
Godeps/Godeps.json
|
||||
hack
|
||||
LICENSE
|
||||
|
@ -475,6 +471,7 @@ function kube::build::source_targets() {
|
|||
README.md
|
||||
test
|
||||
third_party
|
||||
vendor
|
||||
contrib/completions/bash/kubectl
|
||||
contrib/mesos
|
||||
.generated_docs
|
||||
|
@ -547,6 +544,16 @@ function kube::build::clean_images() {
|
|||
}
|
||||
|
||||
function kube::build::ensure_data_container() {
|
||||
# This is temporary, while last remnants of _workspace are obliterated. If
|
||||
# the data container exists it might be from before the change from
|
||||
# Godeps/_workspace/ to vendor/, and thereby still have a Godeps/_workspace/
|
||||
# directory in it, which trips up godep (yay godep!). Once we are confident
|
||||
# that this has run ~everywhere we care about, we can remove this.
|
||||
# TODO(thockin): remove this after v1.3 is cut.
|
||||
if "${DOCKER[@]}" inspect "${KUBE_BUILD_DATA_CONTAINER_NAME}" \
|
||||
| grep -q "Godeps/_workspace/pkg"; then
|
||||
docker rm -f "${KUBE_BUILD_DATA_CONTAINER_NAME}"
|
||||
fi
|
||||
if ! "${DOCKER[@]}" inspect "${KUBE_BUILD_DATA_CONTAINER_NAME}" >/dev/null 2>&1; then
|
||||
kube::log::status "Creating data container"
|
||||
local -ra docker_cmd=(
|
||||
|
|
|
@ -46,7 +46,7 @@ all: container
|
|||
|
||||
kube2sky: kube2sky.go
|
||||
# Only build kube2sky. This requires go and godep in PATH
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) GOARM=$(GOARM) godep go build -a -installsuffix cgo --ldflags '-w' ./kube2sky.go
|
||||
CGO_ENABLED=0 GOARCH=$(ARCH) GOARM=$(GOARM) go build -a -installsuffix cgo --ldflags '-w' ./kube2sky.go
|
||||
|
||||
container:
|
||||
# Copy the content in this dir to the temp dir
|
||||
|
@ -80,7 +80,7 @@ clean:
|
|||
rm -f kube2sky
|
||||
|
||||
test: clean
|
||||
godep go test -v --vmodule=*=4
|
||||
go test -v --vmodule=*=4
|
||||
|
||||
|
||||
.PHONY: all kube2sky container push clean test
|
||||
|
|
|
@ -29,7 +29,7 @@ import (
|
|||
func construct(t *testing.T, files map[string]string) *generator.Context {
|
||||
b := parser.New()
|
||||
for name, src := range files {
|
||||
if err := b.AddFile(name, []byte(src)); err != nil {
|
||||
if err := b.AddFile("/tmp/"+name, name, []byte(src)); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ func New() *Generator {
|
|||
OutputBase: sourceTree,
|
||||
GoHeaderFilePath: filepath.Join(sourceTree, "k8s.io/kubernetes/hack/boilerplate/boilerplate.go.txt"),
|
||||
}
|
||||
defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "Godeps", "_workspace", "src", "github.com", "gogo", "protobuf", "protobuf")
|
||||
defaultProtoImport := filepath.Join(sourceTree, "k8s.io", "kubernetes", "vendor", "github.com", "gogo", "protobuf", "protobuf")
|
||||
return &Generator{
|
||||
Common: common,
|
||||
OutputBase: sourceTree,
|
||||
|
|
|
@ -193,7 +193,7 @@ godep v53 (linux/amd64/go1.5.3)
|
|||
|
||||
### Using godep
|
||||
|
||||
Here's a quick walkthrough of one way to use godeps to add or update a Kubernetes dependency into Godeps/\_workspace. For more details, please see the instructions in [godep's documentation](https://github.com/tools/godep).
|
||||
Here's a quick walkthrough of one way to use godeps to add or update a Kubernetes dependency into `vendor/`. For more details, please see the instructions in [godep's documentation](https://github.com/tools/godep).
|
||||
|
||||
1) Devote a directory to this endeavor:
|
||||
|
||||
|
|
|
@ -82,12 +82,12 @@ See [setup_host.sh](../../test/e2e_node/environment/setup_host.sh)
|
|||
* **Requires password-less ssh and sudo access**
|
||||
* Make sure this works - e.g. `ssh <hostname> -- sudo echo "ok"`
|
||||
* If ssh flags are required (e.g. `-i`), they can be used and passed to the tests with `--ssh-options`
|
||||
* `godep go run test/e2e_node/runner/run_e2e.go --logtostderr --hosts <comma separated hosts>`
|
||||
* `go run test/e2e_node/runner/run_e2e.go --logtostderr --hosts <comma separated hosts>`
|
||||
* **Must be run from kubernetes root**
|
||||
* requires (go get): `github.com/tools/godep`, `github.com/onsi/gomega`, `github.com/onsi/ginkgo/ginkgo`
|
||||
|
||||
3. Alternatively, manually build and copy `e2e_node_test.tar.gz` to a remote host
|
||||
* Build the tar.gz `godep go run test/e2e_node/runner/run_e2e.go --logtostderr --build-only`
|
||||
* Build the tar.gz `go run test/e2e_node/runner/run_e2e.go --logtostderr --build-only`
|
||||
* requires (go get): `github.com/tools/godep`, `github.com/onsi/gomega`, `github.com/onsi/ginkgo/ginkgo`
|
||||
* Copy `e2e_node_test.tar.gz` to the remote host
|
||||
* Extract the archive on the remote host `tar -xzvf e2e_node_test.tar.gz`
|
||||
|
|
|
@ -107,7 +107,7 @@ $ go install golang.org/x/tools/cmd/stress
|
|||
Then build your test binary
|
||||
|
||||
```
|
||||
$ godep go test -c -race
|
||||
$ go test -c -race
|
||||
```
|
||||
|
||||
Then run it under stress
|
||||
|
|
|
@ -84,10 +84,10 @@ hack/test-go.sh # Run all unit tests.
|
|||
cd kubernetes
|
||||
|
||||
# Run all tests under pkg (requires client to be in $GOPATH/src/k8s.io)
|
||||
godep go test ./pkg/...
|
||||
go test ./pkg/...
|
||||
|
||||
# Run all tests in the pkg/api (but not subpackages)
|
||||
godep go test ./pkg/api
|
||||
go test ./pkg/api
|
||||
```
|
||||
|
||||
### Stress running unit tests
|
||||
|
@ -135,7 +135,7 @@ To run benchmark tests, you'll typically use something like:
|
|||
|
||||
```sh
|
||||
cd kubernetes
|
||||
godep go test ./pkg/apiserver -benchmem -run=XXX -bench=BenchmarkWatch
|
||||
go test ./pkg/apiserver -benchmem -run=XXX -bench=BenchmarkWatch
|
||||
```
|
||||
|
||||
This will do the following:
|
||||
|
|
|
@ -25,7 +25,7 @@ keys:
|
|||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $(KEY) -out $(CERT) -subj "/CN=nginxsvc/O=nginxsvc"
|
||||
|
||||
secret:
|
||||
godep go run make_secret.go -crt $(CERT) -key $(KEY) > $(SECRET)
|
||||
go run make_secret.go -crt $(CERT) -key $(KEY) > $(SECRET)
|
||||
|
||||
container:
|
||||
docker build -t $(PREFIX):$(TAG) .
|
||||
|
|
|
@ -42,5 +42,5 @@ gotoprotobuf=$(kube::util::find-binary "go-to-protobuf")
|
|||
# satisfies import of github.com/gogo/protobuf/gogoproto/gogo.proto and the core Google protobuf types
|
||||
PATH="${KUBE_ROOT}/_output/local/go/bin:${PATH}" \
|
||||
"${gotoprotobuf}" \
|
||||
--proto-import="${KUBE_ROOT}/Godeps/_workspace/src" \
|
||||
--proto-import="${KUBE_ROOT}/vendor" \
|
||||
--proto-import="${KUBE_ROOT}/third_party/protobuf"
|
||||
|
|
|
@ -38,7 +38,7 @@ find_files() {
|
|||
-o -wholename './release' \
|
||||
-o -wholename './target' \
|
||||
-o -wholename '*/third_party/*' \
|
||||
-o -wholename '*/Godeps/*' \
|
||||
-o -wholename '*/vendor/*' \
|
||||
\) -prune \
|
||||
\) \
|
||||
\( -wholename '*pkg/api/v*/types.go' \
|
||||
|
|
|
@ -105,7 +105,7 @@ def file_passes(filename, refs, regexs):
|
|||
def file_extension(filename):
|
||||
return os.path.splitext(filename)[1].split(".")[-1].lower()
|
||||
|
||||
skipped_dirs = ['Godeps', 'third_party', '_gopath', '_output', '.git', 'cluster/env.sh', 'vendor']
|
||||
skipped_dirs = ['vendor', 'third_party', '_gopath', '_output', '.git', 'cluster/env.sh', 'vendor']
|
||||
def normalize_files(files):
|
||||
newfiles = []
|
||||
for pathname in files:
|
||||
|
|
|
@ -52,7 +52,7 @@ export LOG_LEVEL=4
|
|||
cd /go/src/k8s.io/kubernetes
|
||||
|
||||
./hack/build-go.sh
|
||||
godep go install ./...
|
||||
go install ./cmd/...
|
||||
./hack/install-etcd.sh
|
||||
|
||||
./hack/verify-all.sh -v
|
||||
|
|
|
@ -113,7 +113,7 @@ kube::golang::test_targets() {
|
|||
cmd/genswaggertypedocs
|
||||
cmd/linkcheck
|
||||
examples/k8petstore/web-server/src
|
||||
github.com/onsi/ginkgo/ginkgo
|
||||
vendor/github.com/onsi/ginkgo/ginkgo
|
||||
test/e2e/e2e.test
|
||||
test/e2e_node/e2e_node.test
|
||||
)
|
||||
|
@ -257,15 +257,14 @@ kube::golang::create_gopath_tree() {
|
|||
# ${PATH}. If not running on Travis, it will also check that the Go version is
|
||||
# good enough for the Kubernetes build.
|
||||
#
|
||||
# Input Vars:
|
||||
# Inputs:
|
||||
# KUBE_EXTRA_GOPATH - If set, this is included in created GOPATH
|
||||
# KUBE_NO_GODEPS - If set, we don't add 'Godeps/_workspace' to GOPATH
|
||||
#
|
||||
# Output Vars:
|
||||
# export GOPATH - A modified GOPATH to our created tree along with extra
|
||||
# stuff.
|
||||
# export GOBIN - This is actively unset if already set as we want binaries
|
||||
# placed in a predictable place.
|
||||
# Outputs:
|
||||
# env-var GOPATH points to our local output dir
|
||||
# env-var GOBIN is unset (we want binaries in a predictable place)
|
||||
# env-var GO15VENDOREXPERIMENT=1
|
||||
# current directory is within GOPATH
|
||||
kube::golang::setup_env() {
|
||||
kube::golang::create_gopath_tree
|
||||
|
||||
|
@ -293,22 +292,26 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
GOPATH=${KUBE_GOPATH}
|
||||
export GOPATH=${KUBE_GOPATH}
|
||||
|
||||
# Append KUBE_EXTRA_GOPATH to the GOPATH if it is defined.
|
||||
if [[ -n ${KUBE_EXTRA_GOPATH:-} ]]; then
|
||||
GOPATH="${GOPATH}:${KUBE_EXTRA_GOPATH}"
|
||||
fi
|
||||
|
||||
# Append the tree maintained by `godep` to the GOPATH unless KUBE_NO_GODEPS
|
||||
# is defined.
|
||||
if [[ -z ${KUBE_NO_GODEPS:-} ]]; then
|
||||
GOPATH="${GOPATH}:${KUBE_ROOT}/Godeps/_workspace"
|
||||
fi
|
||||
export GOPATH
|
||||
# Change directories so that we are within the GOPATH. Some tools get really
|
||||
# upset if this is not true. We use a whole fake GOPATH here to collect the
|
||||
# resultant binaries. Go will not let us use GOBIN with `go install` and
|
||||
# cross-compiling, and `go install -o <file>` only works for a single pkg.
|
||||
local subdir
|
||||
subdir=$(pwd | sed "s|$KUBE_ROOT||")
|
||||
cd "${KUBE_GOPATH}/src/${KUBE_GO_PACKAGE}/${subdir}"
|
||||
|
||||
# Unset GOBIN in case it already exists in the current session.
|
||||
unset GOBIN
|
||||
|
||||
# This seems to matter to some tools (godep, ugorji, ginkgo...)
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
}
|
||||
|
||||
# This will take binaries from $GOPATH/bin and copy them to the appropriate
|
||||
|
@ -334,20 +337,12 @@ kube::golang::place_bins() {
|
|||
platform_src=""
|
||||
fi
|
||||
|
||||
local gopaths=("${KUBE_GOPATH}")
|
||||
# If targets were built inside Godeps, then we need to sync from there too.
|
||||
if [[ -z ${KUBE_NO_GODEPS:-} ]]; then
|
||||
gopaths+=("${KUBE_ROOT}/Godeps/_workspace")
|
||||
local full_binpath_src="${KUBE_GOPATH}/bin${platform_src}"
|
||||
if [[ -d "${full_binpath_src}" ]]; then
|
||||
mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}"
|
||||
find "${full_binpath_src}" -maxdepth 1 -type f -exec \
|
||||
rsync -pt {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
|
||||
fi
|
||||
local gopath
|
||||
for gopath in "${gopaths[@]}"; do
|
||||
local full_binpath_src="${gopath}/bin${platform_src}"
|
||||
if [[ -d "${full_binpath_src}" ]]; then
|
||||
mkdir -p "${KUBE_OUTPUT_BINPATH}/${platform}"
|
||||
find "${full_binpath_src}" -maxdepth 1 -type f -exec \
|
||||
rsync -pt {} "${KUBE_OUTPUT_BINPATH}/${platform}" \;
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -246,10 +246,10 @@ kube::util::gen-analytics() {
|
|||
else
|
||||
dir="${path}"
|
||||
fi
|
||||
# We don't touch files in Godeps|third_party|_gopath, and the kubectl
|
||||
# docs are autogenerated by gendocs.
|
||||
# We don't touch files in special dirs, and the kubectl docs are
|
||||
# autogenerated by gendocs.
|
||||
mdfiles=($( find "${dir}" -name "*.md" -type f \
|
||||
-not -path "${path}/Godeps/*" \
|
||||
-not -path "${path}/vendor/*" \
|
||||
-not -path "${path}/third_party/*" \
|
||||
-not -path "${path}/_gopath/*" \
|
||||
-not -path "${path}/_output/*" \
|
||||
|
|
|
@ -31,7 +31,6 @@ kube::test::find_dirs() {
|
|||
-path './_artifacts/*' \
|
||||
-o -path './_output/*' \
|
||||
-o -path './_gopath/*' \
|
||||
-o -path './Godeps/*' \
|
||||
-o -path './contrib/podex/*' \
|
||||
-o -path './output/*' \
|
||||
-o -path './release/*' \
|
||||
|
@ -40,6 +39,8 @@ kube::test::find_dirs() {
|
|||
-o -path './test/e2e_node/*' \
|
||||
-o -path './test/integration/*' \
|
||||
-o -path './test/component/scheduler/perf/*' \
|
||||
-o -path './third_party/*'\
|
||||
-o -path './vendor/*'\
|
||||
\) -prune \
|
||||
\) -name '*_test.go' -print0 | xargs -0n1 dirname | sed 's|^\./||' | sort -u
|
||||
)
|
||||
|
|
|
@ -34,7 +34,7 @@ generated_files=($(
|
|||
-o -wholename './release' \
|
||||
-o -wholename './target' \
|
||||
-o -wholename '*/third_party/*' \
|
||||
-o -wholename '*/Godeps/*' \
|
||||
-o -wholename '*/vendor/*' \
|
||||
-o -wholename '*/codecgen-*-1234.generated.go' \
|
||||
\) -prune \
|
||||
\) -name '*.generated.go' | sort -r))
|
||||
|
@ -117,7 +117,7 @@ fi
|
|||
|
||||
echo "Building codecgen"
|
||||
CODECGEN="${PWD}/codecgen_binary"
|
||||
godep go build -o "${CODECGEN}" github.com/ugorji/go/codec/codecgen
|
||||
go build -o "${CODECGEN}" ./vendor/github.com/ugorji/go/codec/codecgen
|
||||
|
||||
# Running codecgen fails if some of the files doesn't compile.
|
||||
# Thus (since all the files are completely auto-generated and
|
||||
|
|
|
@ -40,7 +40,7 @@ find_files() {
|
|||
-o -wholename './release' \
|
||||
-o -wholename './target' \
|
||||
-o -wholename '*/third_party/*' \
|
||||
-o -wholename '*/Godeps/*' \
|
||||
-o -wholename '*/vendor/*' \
|
||||
\) -prune \
|
||||
\) -name '*.go'
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ generated_files=($(
|
|||
-o -wholename './release' \
|
||||
-o -wholename './target' \
|
||||
-o -wholename '*/third_party/*' \
|
||||
-o -wholename '*/Godeps/*' \
|
||||
-o -wholename '*/vendor/*' \
|
||||
\) -prune \
|
||||
\) -name '*.generated.go'))
|
||||
|
||||
|
|
|
@ -18,16 +18,17 @@ set -o errexit
|
|||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
|
||||
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/client-gen
|
||||
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/conversion-gen
|
||||
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/deepcopy-gen
|
||||
"${KUBE_ROOT}/hack/build-go.sh" cmd/libs/go2idl/set-gen
|
||||
BUILD_TARGETS=(
|
||||
cmd/libs/go2idl/client-gen
|
||||
cmd/libs/go2idl/conversion-gen
|
||||
cmd/libs/go2idl/deepcopy-gen
|
||||
cmd/libs/go2idl/set-gen
|
||||
)
|
||||
"${KUBE_ROOT}/hack/build-go.sh" ${BUILD_TARGETS[*]}
|
||||
|
||||
"${KUBE_ROOT}/hack/after-build/run-codegen.sh" --verify-only
|
||||
|
|
|
@ -53,8 +53,8 @@ def get_all_files(rootdir):
|
|||
all_files = []
|
||||
for root, dirs, files in os.walk(rootdir):
|
||||
# don't visit certain dirs
|
||||
if 'Godeps' in dirs:
|
||||
dirs.remove('Godeps')
|
||||
if 'vendor' in dirs:
|
||||
dirs.remove('vendor')
|
||||
if '_gopath' in dirs:
|
||||
dirs.remove('_gopath')
|
||||
if 'third_party' in dirs:
|
||||
|
|
|
@ -19,7 +19,7 @@ set -o nounset
|
|||
set -o pipefail
|
||||
|
||||
# As of go 1.6, the vendor experiment is enabled by default.
|
||||
export GO15VENDOREXPERIMENT=0
|
||||
export GO15VENDOREXPERIMENT=1
|
||||
|
||||
#### HACK ####
|
||||
# Sometimes godep just can't handle things. This lets use manually put
|
||||
|
|
|
@ -40,7 +40,7 @@ find_files() {
|
|||
-o -wholename './release' \
|
||||
-o -wholename './target' \
|
||||
-o -wholename '*/third_party/*' \
|
||||
-o -wholename '*/Godeps/*' \
|
||||
-o -wholename '*/vendor/*' \
|
||||
\) -prune \
|
||||
\) -name '*.go'
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ done
|
|||
|
||||
if [[ ${#targets[@]} -eq 0 ]]; then
|
||||
# Do not run on third_party directories.
|
||||
targets=$(go list ./... | grep -v "third_party")
|
||||
targets=$(go list ./... | egrep -v "/(third_party|vendor)/")
|
||||
fi
|
||||
|
||||
# Do this in parallel; results in 5-10x speedup.
|
||||
|
@ -58,7 +58,7 @@ for i in $targets
|
|||
#
|
||||
# The intended result is that each incantation of this line returns
|
||||
# either 0 (pass) or 1 (fail).
|
||||
godep go vet "${goflags[@]:+${goflags[@]}}" "$i" 2>&1 \
|
||||
go vet "${goflags[@]:+${goflags[@]}}" "$i" 2>&1 \
|
||||
| grep -v -E "exit status|GO15VENDOREXPERIMENT=" \
|
||||
|| fail=${PIPESTATUS[0]}
|
||||
exit $fail
|
||||
|
|
|
@ -18,8 +18,6 @@ set -o errexit
|
|||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ fi
|
|||
|
||||
echo -ne "Checking for files that need gofmt... "
|
||||
files_need_gofmt=()
|
||||
files=($(git diff --cached --name-only --diff-filter ACM | grep "\.go" | grep -v -e "third_party" -e "Godeps"))
|
||||
files=($(git diff --cached --name-only --diff-filter ACM | grep "\.go" | grep -v -e "^third_party" -e "^vendor"))
|
||||
for file in "${files[@]}"; do
|
||||
# Check for files that fail gofmt.
|
||||
diff="$(git show ":${file}" | gofmt -s -d 2>&1)"
|
||||
|
|
|
@ -34,7 +34,7 @@ if [ "$INSTALL_GODEP" = true ] ; then
|
|||
go get -u github.com/onsi/gomega
|
||||
fi
|
||||
|
||||
godep go build test/e2e_node/environment/conformance.go
|
||||
godep go run test/e2e_node/runner/run_e2e.go --logtostderr --vmodule=*=2 --ssh-env="gce" \
|
||||
go build test/e2e_node/environment/conformance.go
|
||||
go run test/e2e_node/runner/run_e2e.go --logtostderr --vmodule=*=2 --ssh-env="gce" \
|
||||
--zone="$GCE_ZONE" --project="$GCE_PROJECT" \
|
||||
--hosts="$GCE_HOSTS" --images="$GCE_IMAGES" --cleanup="$CLEANUP"
|
||||
|
|
|
@ -15,9 +15,9 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
// To run the e2e tests against one or more hosts on gce:
|
||||
// $ godep go run run_e2e.go --logtostderr --v 2 --ssh-env gce --hosts <comma separated hosts>
|
||||
// $ go run run_e2e.go --logtostderr --v 2 --ssh-env gce --hosts <comma separated hosts>
|
||||
// To run the e2e tests against one or more images on gce and provision them:
|
||||
// $ godep go run run_e2e.go --logtostderr --v 2 --project <project> --zone <zone> --ssh-env gce --images <comma separated images>
|
||||
// $ go run run_e2e.go --logtostderr --v 2 --project <project> --zone <zone> --ssh-env gce --images <comma separated images>
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -19,7 +19,7 @@ TAG = 1.0
|
|||
PREFIX = gcr.io/google_containers/clusterapi-tester
|
||||
|
||||
main: main.go
|
||||
CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' -o main ./main.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o main ./main.go
|
||||
|
||||
container: main
|
||||
docker build -t $(PREFIX):$(TAG) .
|
||||
|
|
|
@ -19,7 +19,7 @@ TAG = 0.0
|
|||
PREFIX = gcr.io/google_containers/n-way-http
|
||||
|
||||
server: server.go
|
||||
CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server ./server.go
|
||||
|
||||
container: server
|
||||
docker build -t $(PREFIX):$(TAG) .
|
||||
|
|
|
@ -18,7 +18,7 @@ PREFIX = gcr.io/google_containers
|
|||
all: push
|
||||
|
||||
webserver: webserver.go
|
||||
CGO_ENABLED=0 GOOS=linux godep go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
||||
|
||||
container: image
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ PREFIX = gcr.io/google_containers
|
|||
all: clean consumer
|
||||
|
||||
consumer:
|
||||
CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' -o consume-cpu/consume-cpu ./consume-cpu/consume_cpu.go
|
||||
CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' -o consumer .
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' -o consume-cpu/consume-cpu ./consume-cpu/consume_cpu.go
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' -o consumer .
|
||||
|
||||
container: image
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
TAG = 1.0
|
||||
|
||||
cauldron:
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' cauldron.go
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' cauldron.go
|
||||
|
||||
container: cauldron
|
||||
docker build -t kubernetes/cauldron:$(TAG) .
|
||||
|
|
Loading…
Reference in New Issue