fix: fall back to a second go proxy on any download error
goproxy.cn intermittently returns HTTP/2 stream errors while fetching module zips (seen with github.com/dokku/docker-port-forward), which the default comma-separated list does not fall back from since it only retries on 404/410. Use the pipe separator so any error falls through to the aliyun mirror and then direct.
This commit is contained in:
@@ -22,7 +22,7 @@ build-in-docker: clean
|
||||
-v $(GO_MOD_CACHE):/go/pkg/mod \
|
||||
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
||||
-e GO111MODULE=on \
|
||||
-e GOPROXY=https://goproxy.cn,direct \
|
||||
-e "GOPROXY=https://goproxy.cn|https://mirrors.aliyun.com/goproxy/|direct" \
|
||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) GOWORK=off make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
|
||||
Reference in New Issue
Block a user