playground: let clients request vet check in same HTTP request as compile+run Also, move the tests to their own file and extend them a bit, give them names, and make the test step more verbose (only visible in docker build anyway). They were hogging up the sandbox file. Updates golang/go#31970 Change-Id: Id710ea613c77a5b16cc5e79545c0812d0f4650e3 Reviewed-on: https://go-review.googlesource.com/c/playground/+/176598 Reviewed-by: Andrew Bonventre <andybons@golang.org> Reviewed-by: Yury Smolsky <yury@smolsky.by>
This subrepository holds the source for the Go playground: https://play.golang.org/
# build the image docker build -t playground .
docker run --name=play --rm -d -p 8080:8080 playground # run some Go code cat /path/to/code.go | go run client.go | curl -s --upload-file - localhost:8080/compile
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 playground:latest gcr.io/golang-org/playground:latest docker push gcr.io/golang-org/playground:latest gcloud --project=golang-org --account=you@google.com app deploy app.yaml --image-url=gcr.io/golang-org/playground:latest
Then:
gcloud --project=golang-org --account=you@google.com app deploy app.yaml
To submit changes to this repository, see https://golang.org/doc/contribute.html.