Skip to content

Commit

Permalink
deploy: prune old App Engine versions for 2 more playgrounds
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
Run-TryBot: Dmitri Shuralyov <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
dmitshur authored and gopherbot committed Jan 16, 2024
1 parent af6601c commit 8d67851
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
17 changes: 11 additions & 6 deletions deploy/deploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ."
Expand All @@ -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",
Expand Down
15 changes: 10 additions & 5 deletions deploy/deploy_goprev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
"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`"
]
},
{
"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 ."
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions deploy/deploy_gotip.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 ."
Expand Down Expand Up @@ -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"
]
}
],
Expand Down

0 comments on commit 8d67851

Please sign in to comment.