Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump go 1.18.1 #1666

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/check-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
schedule:
- cron: "0 23 * * *"

env:
GO_VERSION: ~1.17
GO_VERSION_WIN: ~1.17

jobs:
terraform:
env:
Expand Down Expand Up @@ -46,7 +42,10 @@ jobs:
with:
ref: ${{ env.github_ref }}

- name: Set up Go 1.x
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh
jnummelin marked this conversation as resolved.
Show resolved Hide resolved

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ on:
- 'mkdocs.yml'
- '*.md'

env:
GO_VERSION: ~1.17
GO_VERSION_WIN: ~1.17

jobs:
lint:
name: Lint
Expand All @@ -41,7 +37,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Go 1.x
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
#pull_request:
env:
GO_VERSION: ~1.17
GO_VERSION_WIN: ~1.17

jobs:
release:
Expand Down Expand Up @@ -51,11 +48,13 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.16
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Build
run: make EMBEDDED_BINS_BUILDMODE=docker
Expand Down Expand Up @@ -118,11 +117,13 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.x
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Build
run: make EMBEDDED_BINS_BUILDMODE=docker k0s.exe
Expand Down Expand Up @@ -154,11 +155,13 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.x
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Build
run: make EMBEDDED_BINS_BUILDMODE=docker
Expand All @@ -171,7 +174,6 @@ jobs:
- name: Run basic smoke test
run: make check-basic


- name: Build bundle for air gap installation
run: make image-bundle/bundle.tar

Expand Down Expand Up @@ -345,11 +347,13 @@ jobs:
- name: Run git checkout
uses: actions/checkout@v3

- name: Set up Go 1.x
- name: Prepare build environment
run: .github/workflows/prepare-build-env.sh

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ endif
.PHONY: all
all: k0s k0s.exe

go.sum: go.mod
go.sum: go.mod .k0sbuild.docker-image.k0s
$(GO) mod tidy

codegen_targets = \
Expand Down Expand Up @@ -142,7 +142,7 @@ k0s: .k0sbuild.docker-image.k0s

k0s.exe: TARGET_OS = windows
k0s.exe: BUILD_GO_CGO_ENABLED = 0
k0s.exe: GOLANG_IMAGE = golang:1.17-alpine
k0s.exe: GOLANG_IMAGE = golang:$(go_version)-alpine

k0s.exe k0s: $(codegen_targets)

Expand Down
3 changes: 1 addition & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine

ARG BUILDIMAGE
FROM $BUILDIMAGE
RUN apk add --no-cache gcc musl-dev binutils-gold

2 changes: 2 additions & 0 deletions build/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Intentionally left empty
// https://github.com/golang/go/issues/30058#issuecomment-543815369
2 changes: 1 addition & 1 deletion embedded-bins/Makefile.variables
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go_version = 1.17.9
go_version = 1.18.1

runc_version = 1.1.1
runc_buildimage = golang:$(go_version)-alpine
Expand Down
4 changes: 2 additions & 2 deletions embedded-bins/containerd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine
ARG BUILDIMAGE
FROM $BUILDIMAGE AS build

ARG VERSION
Expand All @@ -16,7 +16,7 @@ RUN apk upgrade -U -a && apk add \
protoc

RUN mkdir -p $GOPATH/src/github.com/containerd/containerd
RUN git clone -b v$VERSION --depth=1 https://github.com/containerd/containerd.git $GOPATH/src/github.com/containerd/containerd
RUN git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/containerd/containerd.git $GOPATH/src/github.com/containerd/containerd
WORKDIR /go/src/github.com/containerd/containerd
RUN go version
RUN make \
Expand Down
4 changes: 2 additions & 2 deletions embedded-bins/etcd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine
ARG BUILDIMAGE
FROM $BUILDIMAGE AS build

ARG VERSION
Expand All @@ -10,7 +10,7 @@ ARG BUILD_GO_LDFLAGS_EXTRA

RUN apk add build-base git

RUN cd / && git clone -b v$VERSION --depth=1 https://github.com/etcd-io/etcd.git
RUN cd / && git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/etcd-io/etcd.git
WORKDIR /etcd/server
RUN go version
RUN CGO_ENABLED=${BUILD_GO_CGO_ENABLED} \
Expand Down
4 changes: 2 additions & 2 deletions embedded-bins/kine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine
ARG BUILDIMAGE
FROM $BUILDIMAGE AS build

ARG VERSION
Expand All @@ -11,7 +11,7 @@ ARG BUILD_GO_LDFLAGS_EXTRA
RUN apk add build-base git


RUN cd / && git clone -b v$VERSION --depth=1 https://github.com/rancher/kine.git
RUN cd / && git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/rancher/kine.git
WORKDIR /kine
RUN go version
RUN CGO_ENABLED=${BUILD_GO_CGO_ENABLED} \
Expand Down
7 changes: 4 additions & 3 deletions embedded-bins/konnectivity/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine
ARG BUILDIMAGE
FROM $BUILDIMAGE AS build

ARG VERSION
Expand All @@ -10,10 +10,11 @@ ARG BUILD_GO_LDFLAGS_EXTRA

RUN apk add build-base git make protoc

RUN git clone -b v$VERSION --depth=1 https://github.com/k0sproject/apiserver-network-proxy.git /apiserver-network-proxy
RUN git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/k0sproject/apiserver-network-proxy.git /apiserver-network-proxy
WORKDIR /apiserver-network-proxy
RUN go version
RUN GO111MODULE=on go get github.com/golang/mock/mockgen@v1.4.4 github.com/golang/protobuf/protoc-gen-go@v1.4.3 && \
RUN go install github.com/golang/mock/mockgen@v1.4.4 && \
go install github.com/golang/protobuf/protoc-gen-go@v1.4.3 && \
make gen && \
CGO_ENABLED=${BUILD_GO_CGO_ENABLED} \
GOOS=linux \
Expand Down
7 changes: 4 additions & 3 deletions embedded-bins/kubernetes/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine
ARG BUILDIMAGE
FROM $BUILDIMAGE AS build

ARG VERSION
Expand All @@ -13,18 +13,19 @@ ENV COMMANDS="kubelet kube-apiserver kube-scheduler kube-controller-manager"
RUN apk add build-base git go-bindata linux-headers rsync grep coreutils bash

RUN mkdir -p $GOPATH/src/github.com/kubernetes/kubernetes
RUN git clone -b v$VERSION --depth=1 https://github.com/kubernetes/kubernetes.git $GOPATH/src/github.com/kubernetes/kubernetes
RUN git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/kubernetes/kubernetes.git $GOPATH/src/github.com/kubernetes/kubernetes
WORKDIR /go/src/github.com/kubernetes/kubernetes

RUN go version
RUN \
set -e; \
# Ensure that all of the binaries are built with CGO \
if [ ${BUILD_GO_CGO_ENABLED:-0} -eq 1 ]; then \
export KUBE_CGO_OVERRIDES="${COMMANDS}"; \
fi; \
for cmd in $COMMANDS; do \
export KUBE_GIT_VERSION="v$VERSION+k0s"; \
make GOFLAGS="${BUILD_GO_FLAGS} -tags=${BUILD_GO_TAGS}" GOLDFLAGS="${BUILD_GO_LDFLAGS_EXTRA}" WHAT=cmd/$cmd || break;\
make GOFLAGS="${BUILD_GO_FLAGS} -tags=${BUILD_GO_TAGS}" GOLDFLAGS="${BUILD_GO_LDFLAGS_EXTRA}" WHAT=cmd/$cmd; \
done

FROM scratch
Expand Down
5 changes: 3 additions & 2 deletions embedded-bins/kubernetes/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ ENV KUBE_BUILD_PLATFORMS=windows/amd64
RUN apk add build-base git go-bindata linux-headers rsync grep coreutils bash

RUN mkdir -p $GOPATH/src/github.com/kubernetes/kubernetes
RUN git clone -b v$VERSION --depth=1 https://github.com/kubernetes/kubernetes.git $GOPATH/src/github.com/kubernetes/kubernetes
RUN git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/kubernetes/kubernetes.git $GOPATH/src/github.com/kubernetes/kubernetes
WORKDIR /go/src/github.com/kubernetes/kubernetes
RUN \
set -e; \
for cmd in $COMMANDS; do \
make GOFLAGS="-v -tags=providerless" GOLDFLAGS="-extldflags=-static -w -s" WHAT=cmd/$cmd || break;\
make GOFLAGS="-v -tags=providerless" GOLDFLAGS="-extldflags=-static -w -s" WHAT=cmd/$cmd; \
done

FROM scratch
Expand Down
4 changes: 2 additions & 2 deletions embedded-bins/runc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILDIMAGE=golang:1.17-alpine
ARG BUILDIMAGE
FROM $BUILDIMAGE AS build

ARG VERSION
Expand All @@ -24,7 +24,7 @@ RUN make -j$(nproc) -C /libseccomp-$LIBSECCOMP_VERSION check
RUN make -C /libseccomp-$LIBSECCOMP_VERSION install

RUN mkdir -p $GOPATH/src/github.com/opencontainers/runc
RUN git clone -b v$VERSION --depth=1 https://github.com/opencontainers/runc.git $GOPATH/src/github.com/opencontainers/runc
RUN git -c advice.detachedHead=false clone -b v$VERSION --depth=1 https://github.com/opencontainers/runc.git $GOPATH/src/github.com/opencontainers/runc
WORKDIR /go/src/github.com/opencontainers/runc
RUN go version
RUN make \
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/k0sproject/k0s

go 1.17
go 1.18

require (
github.com/Masterminds/sprig v2.22.0+incompatible
Expand Down
Loading