Skip to content

Commit

Permalink
Update Go to v1.18
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
  • Loading branch information
rolinh committed Mar 17, 2022
1 parent d0882e2 commit 1efdbe0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ jobs:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846
- uses: actions/setup-go@v2.2.0
with:
go-version: '1.17.8'
go-version: '1.18.0'
- name: Run static checks
uses: golangci/golangci-lint-action@v3.1.0
with:
version: v1.44.2
args: --config=.golangci.yml --verbose
skip-cache: true
# TODO: uncomment config below and remove `run: make check` once a
# version of golangci-lint with support for Go 1.18 is released.
run: make check
# uses: golangci/golangci-lint-action@v3.1.0
# with:
# version: v1.44.2
# args: --config=.golangci.yml --verbose
# skip-cache: true
- name: Check module vendoring
run: |
go mod tidy
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/library/golang:1.17.8-alpine3.15@sha256:b35984144ec2c2dfd6200e112a9b8ecec4a8fd9eff0babaff330f1f82f14cb2a as builder
FROM docker.io/library/golang:1.18.0-alpine3.15@sha256:075f67eb81e6def1fca765d808ccf6a36eb675071dc4d579e8e8ca5d8f12edc8 as builder
WORKDIR /go/src/github.com/cilium/hubble
RUN apk add --no-cache git make
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ hubble:
$(GO_BUILD) $(if $(GO_TAGS),-tags $(GO_TAGS)) -ldflags "-w -s -X 'github.com/cilium/hubble/pkg.GitBranch=${GIT_BRANCH}' -X 'github.com/cilium/hubble/pkg.GitHash=$(GIT_HASH)' -X 'github.com/cilium/hubble/pkg.Version=${VERSION}'" -o $(TARGET)

release:
docker run --env "RELEASE_UID=$(RELEASE_UID)" --env "RELEASE_GID=$(RELEASE_GID)" --rm --workdir /hubble --volume `pwd`:/hubble docker.io/library/golang:1.17.8-alpine3.15 \
sh -c "apk add --no-cache make && make local-release"
docker run --env "RELEASE_UID=$(RELEASE_UID)" --env "RELEASE_GID=$(RELEASE_GID)" --rm --workdir /hubble --volume `pwd`:/hubble docker.io/library/golang:1.18.0-alpine3.15 \
sh -c "apk add --no-cache make git && make local-release"

local-release: clean
for OS in darwin linux windows; do \
Expand Down
1 change: 0 additions & 1 deletion cmd/record/tty_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build linux
// +build linux

package record

Expand Down
1 change: 0 additions & 1 deletion cmd/record/tty_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

//go:build !linux
// +build !linux

package record

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/cilium/hubble

go 1.17
go 1.18

require (
github.com/cilium/cilium v1.11.1
Expand Down
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

// Ensure build fails on versions of Go that are not supported by Hubble.
// This build tag should be kept in sync with the version specified in go.mod.
//go:build go1.17
// +build go1.17
//go:build go1.18

package main

Expand Down

0 comments on commit 1efdbe0

Please sign in to comment.