deploy,devtools: update ci to use Go 1.18beta2
Change-Id: I5f4f857b576fd68b0d5f58f7926bb598dbfe3cdb
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/382979
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
diff --git a/all.bash b/all.bash
index 00b9413..765eabc 100755
--- a/all.bash
+++ b/all.bash
@@ -5,6 +5,7 @@
source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }
+
# Support ** in globs, for check_script_hashes.
shopt -s globstar
@@ -96,7 +97,7 @@
info "Installing: $1"
# Run in a subshell for convenience, so that we don't have to worry about
# our PWD.
- (set -x; cd && env GO111MODULE=on go get -u $1)
+ (set -x; cd && go install $1@latest)
fi
}
@@ -143,11 +144,12 @@
}
# check_staticcheck runs staticcheck on source files.
+check_staticcheck() {
+ echo "staticcheck disabled until go 1.18"
# TODO: uncomment when updated to go 1.18
-# check_staticcheck() {
-# ensure_go_binary honnef.co/go/tools/cmd/staticcheck
-# runcmd staticcheck $(go list ./... | grep -v third_party | grep -v internal/doc | grep -v internal/render)
-# }
+# ensure_go_binary honnef.co/go/tools/cmd/staticcheck
+# runcmd staticcheck $(go list ./... | grep -v third_party | grep -v internal/doc | grep -v internal/render)
+}
# check_misspell runs misspell on source files.
check_misspell() {
diff --git a/deploy/deploy-env.yaml b/deploy/deploy-env.yaml
index 3f1d92f..25aa16a 100644
--- a/deploy/deploy-env.yaml
+++ b/deploy/deploy-env.yaml
@@ -22,7 +22,7 @@
args:
- $PROJECT_ID
- id: Check redistributable
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: private/devtools/check_redist.sh
- id: Build
name: gcr.io/cloud-builders/docker
@@ -48,7 +48,7 @@
- -c
- deploy/frontend.sh $_ENV gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
- id: Pagecheck
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: deploy/pagecheck.sh
args:
- $_ENV
diff --git a/deploy/deploy.yaml b/deploy/deploy.yaml
index d8715b0..df5769c 100644
--- a/deploy/deploy.yaml
+++ b/deploy/deploy.yaml
@@ -22,7 +22,7 @@
args:
- $PROJECT_ID
- id: Check redistributable
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: private/devtools/check_redist.sh
- id: Build
name: gcr.io/cloud-builders/docker
@@ -48,7 +48,7 @@
- -c
- deploy/frontend.sh staging gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
- id: Pagecheck - staging
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: deploy/pagecheck.sh
args:
- staging
@@ -77,7 +77,7 @@
- -c
- deploy/frontend.sh prod gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
- id: Pagecheck - prod
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: deploy/pagecheck.sh
args:
- prod
@@ -88,7 +88,7 @@
- -c
- deploy/frontend.sh beta gcr.io/$PROJECT_ID/frontend:$(cat _BUILD_TAG)
- id: Pagecheck - beta
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: deploy/pagecheck.sh
args:
- beta
diff --git a/deploy/migrate.yaml b/deploy/migrate.yaml
index cd7f118..a65d4c9 100644
--- a/deploy/migrate.yaml
+++ b/deploy/migrate.yaml
@@ -16,7 +16,7 @@
args:
- $PROJECT_ID
- id: Migrate
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: bash
dir: private
args:
diff --git a/deploy/sitemap.yaml b/deploy/sitemap.yaml
index d324c20..e5b224b 100644
--- a/deploy/sitemap.yaml
+++ b/deploy/sitemap.yaml
@@ -9,7 +9,7 @@
args:
- $PROJECT_ID
- id: Build
- name: golang:1.17.3
+ name: golang:1.18beta2
entrypoint: bash
dir: private
args:
diff --git a/devtools/docker/compose.yaml b/devtools/docker/compose.yaml
index ed4cfa3..6702276 100644
--- a/devtools/docker/compose.yaml
+++ b/devtools/docker/compose.yaml
@@ -29,8 +29,8 @@
# test databases.
depends_on:
- db
- # This should match the version we are using on AppEngine.
- image: golang:1.16.7
+ # This should match the version we are using on Cloud Run.
+ image: golang:1.18beta2
environment:
<<: *database-variables
<<: *go-variables
@@ -43,7 +43,7 @@
- ../../:/pkgsite
working_dir: /pkgsite
searchtest:
- image: golang:1.16.7
+ image: golang:1.18beta2
depends_on:
- frontend
environment:
@@ -56,7 +56,7 @@
- ../../:/pkgsite
working_dir: /pkgsite
api:
- image: golang:1.16.7
+ image: golang:1.18beta2
depends_on:
- frontend
environment:
@@ -69,7 +69,7 @@
working_dir: /pkgsite
frontend:
# This should match the version we are using on AppEngine.
- image: golang:1.16.7
+ image: golang:1.18beta2
depends_on:
- db
command: bash -c "
@@ -87,8 +87,8 @@
- gomodcache:/gomodcache
working_dir: /pkgsite
seeddb:
- # This should match the version we are using on AppEngine.
- image: golang:1.16.7
+ # This should match the version we are using on Cloud Run.
+ image: golang:1.18beta2
depends_on:
- db
# Note: technically we should check that migrations have completed before
@@ -140,8 +140,8 @@
image: chromedp/headless-shell:97.0.4692.71
shm_size: 8G
go:
- # This should match the version we are using on AppEngine.
- image: golang:1.16.7
+ # This should match the version we are using on Cloud Run.
+ image: golang:1.18beta2
entrypoint: go
environment:
<<: *database-variables
@@ -152,4 +152,4 @@
working_dir: /pkgsite
volumes:
gomodcache:
- pgdata:
\ No newline at end of file
+ pgdata: