Skip to content

Commit

Permalink
[v10] Update Go to 1.19.4 (#19155)
Browse files Browse the repository at this point in the history
Update the v10 branches to the latest Go minor release.

FIPS image changes cloned from #16479.
  • Loading branch information
codingllama authored and fheinecke committed Dec 16, 2022
1 parent d407c1f commit 4ba8165
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 40 deletions.
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 @@ -18360,6 +18360,6 @@ volumes:
temp: {}
---
kind: signature
hmac: 25e13ea623222fd5862d231f571a8158e03e80931ba768e4e6e6f2fd51b7d69a
hmac: 198f8324a2a274ccd01d1c73e142aad844ebb3df49079bf1daa5f6c56eab041b

...
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

0 comments on commit 4ba8165

Please sign in to comment.