The Go Playground

Clone this repo:
  1. 541c3c3 deploy: use gcloud to manage triggers, trigger from GCR by Heschi Kreinick · 9 days ago master
  2. 9814fb9 all: increase compile timeout to 10 seconds by Alexander Rakoczy · 3 months ago
  3. 0a69b5b internal/metrics: fix detection of GCE environment by Alexander Rakoczy · 3 months ago
  4. 3398ffb all: instrument build, vet, and run time by Alexander Rakoczy · 3 months ago
  5. d1c0810 internal/metrics: add new package for recording metrics by Alexander Rakoczy · 3 months ago


Go Reference

This subrepository holds the source for the Go playground:


# build the image
docker build -t golang/playground .


docker run --name=play --rm -p 8080:8080 golang/playground &
# run some Go code
cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile


Deployment Triggers

Playground releases automatically triggered when new Go repository tags are pushed to GitHub, or when master is pushed on the playground repository.

For details, see deploy/go_trigger.yaml, deploy/playground_trigger.yaml, and deploy/deploy.json.

Changes to the trigger configuration can be made to the YAML files, or in the GCP UI, which should be kept in sync using the push-cloudbuild-trigger and pull-cloudbuild-trigger make targets.

Deploy via Cloud Build

The Cloud Build configuration will always build and deploy with the latest supported release of Go.

gcloud builds submit --config deploy/deploy.json .

Deploy via gcloud app deploy

Building the playground Docker container takes more than the default 10 minute time limit of cloud build, so increase its timeout first (note, app/cloud_build_timeout is a global configuration value):

gcloud config set app/cloud_build_timeout 1200  # 20 mins

Alternatively, to avoid Cloud Build and build locally:

make docker
docker tag golang/playground:latest
docker push
gcloud --project=golang-org app deploy app.yaml


gcloud --project=golang-org app deploy app.yaml


To submit changes to this repository, see