Skip to content

Commit

Permalink
More work on Go modules
Browse files Browse the repository at this point in the history
Signed-off-by: David Gageot <[email protected]>
  • Loading branch information
dgageot committed Jul 30, 2019
1 parent 6a52cb2 commit 24708b2
Show file tree
Hide file tree
Showing 3,597 changed files with 1,080,669 additions and 137 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 4 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@ dist: xenial

language: go
go: "1.12.x"
go_import_path: /skaffold

git:
submodules: false

env:
global:
- GO111MODULE=on

go_import_path: github.com/GoogleContainerTools/skaffold
- GO111MODULE=on

jobs:
include:
- os: linux
cache:
directories:
- $HOME/.cache/go-build
- $HOME/gopath/pkg/mod
env:
- TEST_TYPE=unit # this is not used, just purely for nice UI distinction on Travis
script:
Expand All @@ -27,10 +21,6 @@ jobs:
after_success:
- bash <(curl -s https://codecov.io/bash)
- os: osx
cache:
directories:
- $HOME/Library/Caches/go-build
- $HOME/gopath/pkg/mod
env:
- TEST_TYPE=unit # this is not used, just purely for nice UI distinction on Travis
script:
Expand All @@ -42,14 +32,13 @@ jobs:
env:
- TEST_TYPE=unit # this is not used, just purely for nice UI distinction on Travis
script:
- go build -o out/skaffold.exe cmd/skaffold/skaffold.go
- go test -short -timeout 60s ./...
- go build -mod=vendor -o out/skaffold.exe cmd/skaffold/skaffold.go
- go test -mod=vendor -short -timeout 60s ./...
- os: linux
env:
- TEST_TYPE=integration # this is not used, just purely for nice UI distinction on Travis
before_install:
- curl -Lo ${HOME}/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.4.0/kind-linux-amd64
- chmod +x ${HOME}/bin/kind
script:
- df -h
- make integration-in-kind
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
GOOS ?= $(shell go env GOOS)
GOARCH = amd64
GO111MODULE = on
BUILD_DIR ?= ./out
ORG := github.com/GoogleContainerTools
PROJECT := skaffold
Expand Down Expand Up @@ -65,7 +66,7 @@ $(BUILD_DIR)/$(PROJECT): $(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH)
cp $(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH) $@

$(BUILD_DIR)/$(PROJECT)-$(GOOS)-$(GOARCH): $(GO_FILES) $(BUILD_DIR)
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 go build -tags $(GO_BUILD_TAGS_$(GOOS)) -ldflags $(GO_LDFLAGS_$(GOOS)) -gcflags $(GO_GCFLAGS) -asmflags $(GO_ASMFLAGS) -o $@ $(BUILD_PACKAGE)
GO111MODULE=$(GO111MODULE) GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 go build -mod=vendor -tags $(GO_BUILD_TAGS_$(GOOS)) -ldflags $(GO_LDFLAGS_$(GOOS)) -gcflags $(GO_GCFLAGS) -asmflags $(GO_ASMFLAGS) -o $@ $(BUILD_PACKAGE)

$(BUILD_DIR)/$(PROJECT)-%-$(GOARCH): $(GO_FILES) $(BUILD_DIR)
docker build --build-arg PROJECT=$(REPOPATH) \
Expand Down Expand Up @@ -95,15 +96,15 @@ cross: $(foreach platform, $(SUPPORTED_PLATFORMS), $(BUILD_DIR)/$(PROJECT)-$(pla

.PHONY: test
test: $(BUILD_DIR)
@ ./hack/test.sh
@ GO111MODULE=$(GO111MODULE) ./hack/test.sh

.PHONY: quicktest
quicktest:
go test -short -timeout=60s ./...
GO111MODULE=$(GO111MODULE) go test -mod=vendor -short -timeout=60s ./...

.PHONY: install
install: $(GO_FILES) $(BUILD_DIR)
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 go install -tags $(GO_BUILD_TAGS_$(GOOS)) -ldflags $(GO_LDFLAGS_$(GOOS)) -gcflags $(GO_GCFLAGS) -asmflags $(GO_ASMFLAGS) $(BUILD_PACKAGE)
GO111MODULE=$(GO111MODULE) GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=1 go install -mod=vendor -tags $(GO_BUILD_TAGS_$(GOOS)) -ldflags $(GO_LDFLAGS_$(GOOS)) -gcflags $(GO_GCFLAGS) -asmflags $(GO_ASMFLAGS) $(BUILD_PACKAGE)

.PHONY: integration
integration: install
Expand All @@ -114,7 +115,7 @@ ifeq ($(GCP_ONLY),true)
--project $(GCP_PROJECT)
endif
kubectl get nodes -oyaml
GCP_ONLY=$(GCP_ONLY) go test -v $(REPOPATH)/integration -timeout 20m $(INTEGRATION_TEST_ARGS)
GO111MODULE=$(GO111MODULE) GCP_ONLY=$(GCP_ONLY) go test -mod=vendor -v $(REPOPATH)/integration -timeout 20m $(INTEGRATION_TEST_ARGS)

.PHONY: release
release: cross $(BUILD_DIR)/VERSION
Expand Down
5 changes: 3 additions & 2 deletions deploy/webhook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ COPY --from=download-hugo /hugo /usr/local/bin/
COPY --from=download-kubectl /kubectl /usr/local/bin/

FROM golang:1.12 as webhook
WORKDIR $GOPATH/src/github.com/GoogleContainerTools/skaffold
ENV GO111MODULE on
WORKDIR /skaffold
COPY . .
RUN go build -o /webhook webhook/webhook.go
RUN go build -mod=vendor -o /webhook webhook/webhook.go

FROM runtime_deps
COPY --from=webhook /webhook /webhook
114 changes: 0 additions & 114 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hack/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GREEN='\033[0;32m'
RESET='\033[0m'

echo "Running go tests..."
go test -count=1 -race -cover -short -timeout=60s -coverprofile=out/coverage.txt -coverpkg="./pkg/...,./cmd/..." ./... | awk -v FAIL="${RED}FAIL${RESET}" '! /no test files/ { gsub("FAIL", FAIL, $0); print $0 }'
go test -mod=vendor -count=1 -race -cover -short -timeout=60s -coverprofile=out/coverage.txt -coverpkg="./pkg/...,./cmd/..." ./... | awk -v FAIL="${RED}FAIL${RESET}" '! /no test files/ { gsub("FAIL", FAIL, $0); print $0 }'

GO_TEST_EXIT_CODE=${PIPESTATUS[0]}
if [[ $GO_TEST_EXIT_CODE -ne 0 ]]; then
Expand Down
1 change: 1 addition & 0 deletions vendor/4d63.com/tz/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/4d63.com/tz/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 53 additions & 0 deletions vendor/4d63.com/tz/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions vendor/4d63.com/tz/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/4d63.com/tz/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions vendor/4d63.com/tz/tz.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,194 changes: 1,194 additions & 0 deletions vendor/4d63.com/tz/zoneinfo.go

Large diffs are not rendered by default.

Loading

0 comments on commit 24708b2

Please sign in to comment.