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

[v10] Update Go to 1.19.4 #19155

Merged
merged 4 commits into from
Dec 8, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 17 additions & 17 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ name: push-build-linux-amd64
environment:
BUILDBOX_VERSION: teleport10
GID: "1000"
RUNTIME: go1.18.9
RUNTIME: go1.19.4
UID: "1000"
trigger:
event:
Expand Down Expand Up @@ -152,7 +152,7 @@ name: push-build-linux-386
environment:
BUILDBOX_VERSION: teleport10
GID: "1000"
RUNTIME: go1.18.9
RUNTIME: go1.19.4
UID: "1000"
trigger:
event:
Expand Down Expand Up @@ -257,7 +257,7 @@ name: push-build-linux-amd64-fips
environment:
BUILDBOX_VERSION: teleport10
GID: "1000"
RUNTIME: go1.18.9
RUNTIME: go1.19.4
UID: "1000"
trigger:
event:
Expand Down Expand Up @@ -366,7 +366,7 @@ name: push-build-windows-amd64
environment:
BUILDBOX_VERSION: teleport10
GID: "1000"
RUNTIME: go1.18.9
RUNTIME: go1.19.4
UID: "1000"
trigger:
event:
Expand Down Expand Up @@ -533,7 +533,7 @@ steps:
- tar -C /tmp/build-$DRONE_BUILD_NUMBER-$DRONE_BUILD_CREATED/toolchains -xzf $RUNTIME.darwin-amd64.tar.gz
- rm -rf $RUNTIME.darwin-amd64.tar.gz
environment:
RUNTIME: go1.18.9
RUNTIME: go1.19.4
- name: Install Rust Toolchain
commands:
- set -u
Expand Down Expand Up @@ -1114,7 +1114,7 @@ name: push-build-linux-arm
environment:
BUILDBOX_VERSION: teleport10
GID: "1000"
RUNTIME: go1.18.9
RUNTIME: go1.19.4
UID: "1000"
trigger:
event:
Expand Down Expand Up @@ -1219,7 +1219,7 @@ name: push-build-linux-arm64
environment:
BUILDBOX_VERSION: teleport10
GID: "1000"
RUNTIME: go1.18.9
RUNTIME: go1.19.4
UID: "1000"
trigger:
event:
Expand Down Expand Up @@ -1660,7 +1660,7 @@ type: kubernetes
name: build-linux-amd64-centos7
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -1849,7 +1849,7 @@ type: kubernetes
name: build-linux-amd64-centos7-fips
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -2037,7 +2037,7 @@ type: kubernetes
name: build-linux-amd64
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -2238,7 +2238,7 @@ type: kubernetes
name: build-linux-amd64-fips
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -3452,7 +3452,7 @@ type: kubernetes
name: build-linux-386
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -4212,7 +4212,7 @@ steps:
- tar -C /tmp/build-$DRONE_BUILD_NUMBER-$DRONE_BUILD_CREATED/toolchains -xzf $RUNTIME.darwin-amd64.tar.gz
- rm -rf $RUNTIME.darwin-amd64.tar.gz
environment:
RUNTIME: go1.18.9
RUNTIME: go1.19.4
- name: Install Rust Toolchain
commands:
- set -u
Expand Down Expand Up @@ -4783,7 +4783,7 @@ type: kubernetes
name: build-linux-arm
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -4969,7 +4969,7 @@ type: kubernetes
name: build-linux-arm64
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -6183,7 +6183,7 @@ type: kubernetes
name: build-windows-amd64
environment:
BUILDBOX_VERSION: teleport10
RUNTIME: go1.18.9
RUNTIME: go1.19.4
trigger:
event:
include:
Expand Down Expand Up @@ -18264,6 +18264,6 @@ volumes:
temp: {}
---
kind: signature
hmac: a1b56ad487d98821ff1b5f7b8441e094ba840c85c0af2e1a6b7c299714d4132b
hmac: 4465f8038b3e6d86e2f5050f5cd2407ab02c26ed91dae95a952186ba3e8d3f5b

...
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gravitational/teleport/api

go 1.18
go 1.19

require (
github.com/gogo/protobuf v1.3.2
Expand Down
18 changes: 5 additions & 13 deletions build.assets/Dockerfile-centos7-fips
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ ENV LANGUAGE=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
LC_CTYPE=en_US.UTF-8

ARG BORINGCRYPTO_RUNTIME
ARG GO_BOOTSTRAP_RUNTIME=go1.9.7

ARG UID
ARG GID
RUN (groupadd ci --gid=$GID -o && useradd ci --uid=$UID --gid=$GID --create-home --shell=/bin/sh && \
Expand Down Expand Up @@ -70,22 +67,17 @@ RUN yum groupinstall -y 'Development Tools' && \
RUN (curl -L https://github.com/coreos/etcd/releases/download/v3.3.9/etcd-v3.3.9-linux-amd64.tar.gz | tar -xz && \
cp etcd-v3.3.9-linux-amd64/etcd* /bin/)

# BoringCrypto (unlike regular Go) requires glibc 2.14, so we have to build from source.
# 1) Install older binary Go runtime for bootstrapping
# 2) Get source for the correct Go boringcrypto runtime and compile it with Go bootstrap runtime
# 3) Erase Go bootstrap runtime and create build directories
# 4) Print compiled Go version
RUN mkdir -p /go-bootstrap && cd /go-bootstrap && curl https://dl.google.com/go/${GO_BOOTSTRAP_RUNTIME}.linux-amd64.tar.gz | tar xz && \
mkdir -p /opt && cd /opt && curl https://go-boringcrypto.storage.googleapis.com/${BORINGCRYPTO_RUNTIME}.src.tar.gz | tar xz && \
cd /opt/go/src && GOROOT_BOOTSTRAP=/go-bootstrap/go ./make.bash && \
rm -rf /go-bootstrap && \
# Install Go.
ARG GOLANG_VERSION
RUN mkdir -p /opt && cd /opt && curl https://storage.googleapis.com/golang/$GOLANG_VERSION.linux-amd64.tar.gz | tar xz && \
mkdir -p /go/src/github.com/gravitational/teleport && \
chmod a+w /go && \
chmod a+w /var/lib && \
chmod a-w / && \
/opt/go/bin/go version

ENV GOPATH="/go" \
ENV GOEXPERIMENT=boringcrypto \
GOPATH="/go" \
GOROOT="/opt/go" \
PATH="/opt/llvm/bin:$PATH:/opt/go/bin:/go/bin:/go/src/github.com/gravitational/teleport/build"

Expand Down
7 changes: 4 additions & 3 deletions build.assets/Dockerfile-fips
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ RUN (curl -L https://github.com/coreos/etcd/releases/download/v3.3.9/etcd-v3.3.9
cp etcd-v3.3.9-linux-amd64/etcd* /bin/)

# Install Go.
ARG BORINGCRYPTO_RUNTIME
RUN mkdir -p /opt && cd /opt && curl https://go-boringcrypto.storage.googleapis.com/${BORINGCRYPTO_RUNTIME}.linux-amd64.tar.gz | tar xz && \
ARG GOLANG_VERSION
RUN mkdir -p /opt && cd /opt && curl https://storage.googleapis.com/golang/$GOLANG_VERSION.linux-amd64.tar.gz | tar xz && \
mkdir -p /go/src/github.com/gravitational/teleport && \
chmod a+w /go && \
chmod a+w /var/lib && \
chmod a-w /
ENV GOPATH="/go" \
ENV GOEXPERIMENT=boringcrypto \
GOPATH="/go" \
GOROOT="/opt/go" \
PATH="$PATH:/opt/go/bin:/go/bin:/go/src/github.com/gravitational/teleport/build"

Expand Down
7 changes: 3 additions & 4 deletions build.assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ TEST_KUBE ?=

OS ?= linux
ARCH ?= amd64
GOLANG_VERSION ?= go1.18.9
GOLANG_VERSION ?= go1.19.4
RUST_VERSION ?= 1.63.0 # don't bump this without checking GLIBC compatibility
NODE_VERSION ?= 16.13.2
BORINGCRYPTO_RUNTIME=$(GOLANG_VERSION)b7
LIBBPF_VERSION ?= 0.7.0-teleport

UID := $$(id -u)
Expand Down Expand Up @@ -143,7 +142,7 @@ buildbox-fips:
docker build \
--build-arg UID=$(UID) \
--build-arg GID=$(GID) \
--build-arg BORINGCRYPTO_RUNTIME=$(BORINGCRYPTO_RUNTIME) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg LIBBPF_VERSION=$(LIBBPF_VERSION) \
--cache-from $(BUILDBOX_FIPS) \
--tag $(BUILDBOX_FIPS) -f Dockerfile-fips . ; \
Expand Down Expand Up @@ -175,7 +174,7 @@ buildbox-centos7-fips:
docker build \
--build-arg UID=$(UID) \
--build-arg GID=$(GID) \
--build-arg BORINGCRYPTO_RUNTIME=$(BORINGCRYPTO_RUNTIME) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg RUST_VERSION=$(RUST_VERSION) \
--build-arg LIBBPF_VERSION=$(LIBBPF_VERSION) \
--cache-from $(BUILDBOX_CENTOS7_FIPS) \
Expand Down
2 changes: 1 addition & 1 deletion e
Submodule e updated from 339ca5 to 396762
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/gravitational/teleport

go 1.18
go 1.19

require (
cloud.google.com/go/firestore v1.6.1
Expand Down