Skip to content
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
18 changes: 18 additions & 0 deletions go/cloudbuild-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ steps:
]
waitFor: ["go125-build"]


# Go 1.26 build
- name: gcr.io/cloud-builders/docker
args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/go126", "."]
dir: go/go126
id: go126-build
waitFor: ["-"]
- name: gcr.io/gcp-runtimes/structure_test
args:
[
"-i",
"us-central1-docker.pkg.dev/$PROJECT_ID/go126",
"--config",
"/workspace/go/go126.yaml",
"-v",
]
waitFor: ["go126-build"]

# Go 1.25 release build
- name: gcr.io/cloud-builders/docker
args: ["build", "-t", "us-central1-docker.pkg.dev/$PROJECT_ID/release-images/go125", "."]
Expand Down
18 changes: 18 additions & 0 deletions go/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,27 @@ steps:
]
waitFor: ["go125-build"]

# Go 1.26 build
- name: gcr.io/cloud-builders/docker
args: ["build", "-t", "gcr.io/$PROJECT_ID/go126", "."]
dir: go/go126
id: go126-build
waitFor: ["-"]
- name: gcr.io/gcp-runtimes/structure_test
args:
[
"-i",
"gcr.io/$PROJECT_ID/go126",
"--config",
"/workspace/go/go126.yaml",
"-v",
]
waitFor: ["go126-build"]

images:
- gcr.io/$PROJECT_ID/go124
- gcr.io/$PROJECT_ID/go125
- gcr.io/$PROJECT_ID/go126

options:
logging: CLOUD_LOGGING_ONLY
22 changes: 22 additions & 0 deletions go/go126.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

schemaVersion: 1.0.0
commandTests:
- name: "version"
command: ["go", "version"]
expectedOutput: ["go version go1.26"]
- name: "gcloud"
command: ["gcloud", "version"]
expectedOutput: ["Google Cloud SDK"]
54 changes: 54 additions & 0 deletions go/go126/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.26

# Install dependencies
RUN set -ex; \
apt-get update -y; \
apt-get install -y \
unzip wget vim \
# for docker
apt-transport-https ca-certificates curl gnupg

RUN install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
chmod a+r /etc/apt/keyrings/docker.gpg && \
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update
RUN apt-get install -y docker-ce docker-ce-cli containerd.io

RUN rm -rf /var/lib/apt/lists/*

# Install protoc
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip
RUN unzip protoc-3.13.0-linux-x86_64.zip
RUN mv bin/protoc /bin/protoc && which protoc

# Install gcloud SDK
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \
apt-get update -y && apt-get install google-cloud-cli -y

# Install tools used in build
RUN (export GOTOOLCHAIN='auto' && \
go install honnef.co/go/tools/cmd/staticcheck@latest && \
go install github.com/jstemmer/go-junit-report@latest && \
go install gotest.tools/gotestsum@latest && \
go install golang.org/x/lint/golint@latest && \
go install golang.org/x/tools/cmd/goimports@latest)

WORKDIR $GOPATH