Skip to content

Commit 0c71934

Browse files
committed
deploy,devtools: use golang:1.20 image
This will make pkgsite pick up the latest 1.20.x. And - reenable staticcheck. - mark the working directory as safe when running for ci. (this workaround is needed after the security patch https://release.debian.org/proposed-updates/bullseye_diffs/git_2.30.2-1+deb11u1.debdiff) Updates golang/go#53532 Change-Id: I31c5fc838821d8bd6ade81dc439eb46fabb75fe1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/468917 Run-TryBot: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]> TryBot-Result: kokoro <[email protected]>
1 parent 81f6f8d commit 0c71934

File tree

6 files changed

+22
-17
lines changed

6 files changed

+22
-17
lines changed

all.bash

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,8 @@ check_vet() {
148148

149149
# check_staticcheck runs staticcheck on source files.
150150
check_staticcheck() {
151-
ensure_go_binary honnef.co/go/tools/cmd/staticcheck
152-
# runcmd staticcheck $(go list ./... | grep -v third_party | grep -v internal/doc | grep -v internal/render)
153-
echo "disabling staticcheck until go1.20 is supported"
151+
ensure_go_binary honnef.co/go/tools/cmd/staticcheck
152+
runcmd staticcheck $(go list ./... | grep -v third_party | grep -v internal/doc | grep -v internal/render)
154153
}
155154

156155
# check_misspell runs misspell on source files.
@@ -318,6 +317,12 @@ main() {
318317
# permissions or that don't test the code.
319318
# Also, run the race detector on most tests.
320319
local start=`date +%s`
320+
321+
# Explicitly mark the working directory as safe in CI.
322+
# https://github.com/docker-library/golang/issues/452
323+
local wd=$(pwd)
324+
runcmd git config --system --add safe.directory ${wd}
325+
321326
standard_linters
322327
# Print how long it takes to download dependencies and run the standard
323328
# linters in CI.

deploy/deploy-env.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ steps:
2222
args:
2323
- $PROJECT_ID
2424
- id: Check redistributable
25-
name: golang:1.20rc3
25+
name: golang:1.20
2626
entrypoint: private/devtools/check_redist.sh
2727
- id: Build
2828
name: gcr.io/cloud-builders/docker
@@ -48,7 +48,7 @@ steps:
4848
- -c
4949
- deploy/frontend.sh $_ENV gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
5050
- id: Pagecheck
51-
name: golang:1.20rc3
51+
name: golang:1.20
5252
entrypoint: deploy/pagecheck.sh
5353
args:
5454
- $_ENV

deploy/deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ steps:
2222
args:
2323
- $PROJECT_ID
2424
- id: Check redistributable
25-
name: golang:1.20rc3
25+
name: golang:1.20
2626
entrypoint: private/devtools/check_redist.sh
2727
- id: Build
2828
name: gcr.io/cloud-builders/docker
@@ -48,7 +48,7 @@ steps:
4848
- -c
4949
- deploy/frontend.sh staging gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
5050
- id: Pagecheck - staging
51-
name: golang:1.20rc3
51+
name: golang:1.20
5252
entrypoint: deploy/pagecheck.sh
5353
args:
5454
- staging
@@ -77,7 +77,7 @@ steps:
7777
- -c
7878
- deploy/frontend.sh prod gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
7979
- id: Pagecheck - prod
80-
name: golang:1.20rc3
80+
name: golang:1.20
8181
entrypoint: deploy/pagecheck.sh
8282
args:
8383
- prod
@@ -88,7 +88,7 @@ steps:
8888
- -c
8989
- deploy/frontend.sh beta gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
9090
- id: Pagecheck - beta
91-
name: golang:1.20rc3
91+
name: golang:1.20
9292
entrypoint: deploy/pagecheck.sh
9393
args:
9494
- beta

deploy/migrate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ steps:
1616
args:
1717
- $PROJECT_ID
1818
- id: Migrate
19-
name: golang:1.20rc3
19+
name: golang:1.20
2020
entrypoint: bash
2121
dir: private
2222
args:

deploy/sitemap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ steps:
99
args:
1010
- $PROJECT_ID
1111
- id: Build
12-
name: golang:1.20rc3
12+
name: golang:1.20
1313
entrypoint: bash
1414
dir: private
1515
args:

devtools/docker/compose.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
depends_on:
3232
- db
3333
# This should match the version we are using on Cloud Run.
34-
image: golang:1.20rc3
34+
image: golang:1.20
3535
environment:
3636
<<: *database-variables
3737
<<: *go-variables
@@ -44,7 +44,7 @@ services:
4444
- ../../:/pkgsite
4545
working_dir: /pkgsite
4646
searchtest:
47-
image: golang:1.20rc3
47+
image: golang:1.20
4848
depends_on:
4949
- frontend
5050
environment:
@@ -57,7 +57,7 @@ services:
5757
- ../../:/pkgsite
5858
working_dir: /pkgsite
5959
api:
60-
image: golang:1.20rc3
60+
image: golang:1.20
6161
depends_on:
6262
- frontend
6363
environment:
@@ -70,7 +70,7 @@ services:
7070
working_dir: /pkgsite
7171
frontend:
7272
# This should match the version we are using on AppEngine.
73-
image: golang:1.20rc3
73+
image: golang:1.20
7474
depends_on:
7575
- db
7676
command: bash -c "
@@ -89,7 +89,7 @@ services:
8989
working_dir: /pkgsite
9090
seeddb:
9191
# This should match the version we are using on Cloud Run.
92-
image: golang:1.20rc3
92+
image: golang:1.20
9393
depends_on:
9494
- db
9595
# Note: technically we should check that migrations have completed before
@@ -142,7 +142,7 @@ services:
142142
shm_size: 8G
143143
go:
144144
# This should match the version we are using on Cloud Run.
145-
image: golang:1.20rc3
145+
image: golang:1.20
146146
entrypoint: go
147147
environment:
148148
<<: *database-variables

0 commit comments

Comments
 (0)