From 946aea489680a762acfff9144c2facae95143610 Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Wed, 3 Mar 2021 09:55:27 +0530 Subject: [PATCH] staging/publishing: add -mod=mod for smoke tests for go1.16 With the move to go1.16, we are hitting a go bug for how `go build`/`go test` work with modules - golang/go#44129. This commit adds the `-mod=mod` flag for `go build` and `go test` commands in the smoke test rules (workaround mentioned in the issue). --- staging/publishing/rules.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/staging/publishing/rules.yaml b/staging/publishing/rules.yaml index 9155ea53a91..346fd3ea4c8 100644 --- a/staging/publishing/rules.yaml +++ b/staging/publishing/rules.yaml @@ -154,8 +154,8 @@ rules: branch: release-1.20 smoke-test: | # assumes GO111MODULE=on - go build ./... - go test ./... + go build -mod=mod ./... + go test -mod=mod ./... - destination: component-base library: true @@ -510,7 +510,7 @@ rules: - k8s.io/code-generator smoke-test: | # assumes GO111MODULE=on - go build . + go build -mod=mod . - destination: sample-controller branches: @@ -594,7 +594,7 @@ rules: - k8s.io/code-generator smoke-test: | # assumes GO111MODULE=on - go build . + go build -mod=mod . - destination: apiextensions-apiserver branches: