deploy: prune old App Engine versions for 2 more playgrounds
CL 398574 added a step to use versionprune and prune old versions of
the gotip playground. Apply the same change to the other two for the
same reason.
Also switch from 'go install' to 'go run' to simplify the invocation,
and use a single dash in flags as is canonical style for Go commands.
While here, also improve consistency between these files:
• apply the change in CL 480275 to deploy.json too
• use 'sh' everywhere, instead of a mix of 'bash' and 'sh'
• drop GO111MODULE=on since it's the default
For golang/go#59303.
Change-Id: I921e768d15743a7a93ece8a1f671eaa0ee2e328a
Reviewed-on: https://go-review.googlesource.com/c/playground/+/555656
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/deploy/deploy.json b/deploy/deploy.json
index e749acf..43e4247 100644
--- a/deploy/deploy.json
+++ b/deploy/deploy.json
@@ -2,18 +2,15 @@
"steps": [
{
"name": "golang",
- "env": [
- "GO111MODULE=on"
- ],
- "entrypoint": "bash",
+ "entrypoint": "sh",
"args": [
"-c",
- "go run golang.org/x/playground/cmd/latestgo > /workspace/goversion; echo GO_VERSION=`cat /workspace/goversion`"
+ "go run golang.org/x/playground/cmd/latestgo > /workspace/goversion && echo GO_VERSION=`cat /workspace/goversion`"
]
},
{
"name": "gcr.io/cloud-builders/docker",
- "entrypoint": "bash",
+ "entrypoint": "sh",
"args": [
"-c",
"docker build --build-arg GO_VERSION=`cat /workspace/goversion` -t gcr.io/$PROJECT_ID/playground ."
@@ -35,6 +32,14 @@
"--project=$PROJECT_ID",
"--image-url=gcr.io/$PROJECT_ID/playground:latest"
]
+ },
+ {
+ "name": "golang",
+ "entrypoint": "sh",
+ "args": [
+ "-c",
+ "go run golang.org/x/website/cmd/versionprune@latest -dry_run=false -project=$PROJECT_ID -service=play"
+ ]
}
],
"timeout": "3600s",
diff --git a/deploy/deploy_goprev.json b/deploy/deploy_goprev.json
index a4731cc..e97e180 100644
--- a/deploy/deploy_goprev.json
+++ b/deploy/deploy_goprev.json
@@ -2,10 +2,7 @@
"steps": [
{
"name": "golang",
- "env": [
- "GO111MODULE=on"
- ],
- "entrypoint": "bash",
+ "entrypoint": "sh",
"args": [
"-c",
"go run golang.org/x/playground/cmd/latestgo -prev > /workspace/goversion && echo GO_VERSION=`cat /workspace/goversion`"
@@ -13,7 +10,7 @@
},
{
"name": "gcr.io/cloud-builders/docker",
- "entrypoint": "bash",
+ "entrypoint": "sh",
"args": [
"-c",
"docker build --build-arg GO_VERSION=`cat /workspace/goversion` -t gcr.io/$PROJECT_ID/playground-goprev ."
@@ -35,6 +32,14 @@
"--project=$PROJECT_ID",
"--image-url=gcr.io/$PROJECT_ID/playground-goprev:latest"
]
+ },
+ {
+ "name": "golang",
+ "entrypoint": "sh",
+ "args": [
+ "-c",
+ "go run golang.org/x/website/cmd/versionprune@latest -dry_run=false -project=$PROJECT_ID -service=goprevplay"
+ ]
}
],
"timeout": "3600s",
diff --git a/deploy/deploy_gotip.json b/deploy/deploy_gotip.json
index 5d7feb8..cafeb16 100644
--- a/deploy/deploy_gotip.json
+++ b/deploy/deploy_gotip.json
@@ -2,7 +2,7 @@
"steps": [
{
"name": "gcr.io/cloud-builders/docker",
- "entrypoint": "bash",
+ "entrypoint": "sh",
"args": [
"-c",
"docker build --build-arg GO_VERSION=master -t gcr.io/$PROJECT_ID/playground-gotip ."
@@ -30,7 +30,7 @@
"entrypoint": "sh",
"args": [
"-c",
- "go install golang.org/x/website/cmd/versionprune@latest && versionprune --dry_run=false --project=$PROJECT_ID --service=gotipplay"
+ "go run golang.org/x/website/cmd/versionprune@latest -dry_run=false -project=$PROJECT_ID -service=gotipplay"
]
}
],