Merge pull request #3902 from weaveworks/go-1-17-8

Update Go to 1.17.8; tidy build image
This commit is contained in:
Bryan Boreham
2022-06-27 11:03:57 +01:00
committed by GitHub
18 changed files with 20 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ version: 2
defaults: &defaults
working_directory: /go/src/github.com/weaveworks/scope
docker:
- image: weaveworks/scope-backend-build:build-updates-1b1c9664
- image: weaveworks/scope-backend-build:go-1-17-8-bcdf2caa
client-defaults: &client-defaults
working_directory: /home/weave/scope

View File

@@ -107,6 +107,7 @@ type pendingEntry struct {
older []*report.Report
}
// NewLiveCollector makes a new LiveCollector from the supplied config.
func NewLiveCollector(config LiveCollectorConfig) (app.Collector, error) {
c := &liveCollector{
cfg: config,

View File

@@ -1,4 +1,4 @@
FROM golang:1.16.2
FROM golang:1.17.8-buster
ENV SCOPE_SKIP_UI_ASSETS true
RUN set -eux; \
export arch_val="$(dpkg --print-architecture)"; \
@@ -7,22 +7,14 @@ RUN set -eux; \
apt-get install -y libpcap-dev time file shellcheck git gcc-arm-linux-gnueabihf curl build-essential gcc-s390x-linux-gnu; \
else \
apt-get install -y libpcap-dev time file shellcheck git curl build-essential; \
fi; \
\
fi && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN go clean -i net && \
go install -tags netgo std && \
export arch_val="$(dpkg --print-architecture)"; \
if [ "$arch_val" != "ppc64el" ] && [ "$arch_val" != "s390x" ]; then \
go install -race -tags netgo std; \
fi; \
go get -tags netgo \
RUN go get -tags netgo \
github.com/fzipp/gocyclo \
golang.org/x/lint/golint \
github.com/kisielk/errcheck \
github.com/client9/misspell/cmd/misspell && \
chmod a+wr --recursive /usr/local/go && \
rm -rf /go/pkg/ /go/src/
# Only install shfmt on amd64, as the version v1.3.0 isn't supported for ppc64le

View File

@@ -1,4 +1,5 @@
// withNetNS function requires a fix that first appeared in Go version 1.10
//go:build go1.10
// +build go1.10
package docker

View File

@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package docker

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build (linux && amd64) || (linux && ppc64le)
// +build linux,amd64 linux,ppc64le
// Build constraint to use this file for amd64 & ppc64le on Linux

View File

@@ -1,3 +1,4 @@
//go:build darwin || arm || arm64 || s390x
// +build darwin arm arm64 s390x
// Cross-compiling the snooper requires having pcap binaries,

View File

@@ -1,3 +1,4 @@
//go:build (linux && amd64) || (linux && ppc64le)
// +build linux,amd64 linux,ppc64le
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package endpoint

View File

@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package endpoint

View File

@@ -1,5 +1,6 @@
// Ensure go mod fetches files needed to build the Docker container;
// the build constraint ensures this file is ignored
//go:build tools
// +build tools
package report

View File

@@ -1,5 +1,6 @@
// Ensure go mod fetches files needed at code generation time;
// the build constraint ensures this file is ignored
//go:build tools
// +build tools
package report