golang.org/x/playground@v0.0.0-20230418134305-14ebe15bcd59/Makefile (about) 1 LATEST_GO := $(shell go run ./cmd/latestgo) 2 3 .PHONY: docker test update-cloudbuild-trigger 4 5 docker: 6 docker build --build-arg GO_VERSION=$(LATEST_GO) -t golang/playground . 7 8 runlocal: 9 docker network create sandnet || true 10 docker kill play_dev || true 11 docker run --name=play_dev --rm --network=sandnet -ti -p 127.0.0.1:8081:8080/tcp golang/playground --backend-url="http://sandbox_dev.sandnet/run" 12 13 test_go: 14 # Run fast tests first: (and tests whether, say, things compile) 15 GO111MODULE=on go test -v ./... 16 17 test_gvisor: docker 18 docker kill sandbox_front_test || true 19 docker run --rm --name=sandbox_front_test --network=sandnet -t golang/playground --runtests 20 21 # Note: test_gvisor is not included in "test" yet, because it requires 22 # running a separate server first ("make runlocal" in the sandbox 23 # directory) 24 test: test_go 25 26 define GOTIP_MESSAGE 27 Note: deploy/gotip_schedule.yaml must be manually managed with gcloud. 28 Example: 29 gcloud scheduler jobs update http \ 30 projects/golang-org/locations/us-central1/jobs/playground-deploy-gotip-playground-schedule \ 31 --schedule="0 10 * * *" --time-zone="America/New_York" 32 endef 33 export GOTIP_MESSAGE 34 35 push-cloudbuild-triggers: 36 gcloud beta builds triggers import --project golang-org --source deploy/go_trigger.yaml 37 gcloud beta builds triggers import --project golang-org --source deploy/go_goprev_trigger.yaml 38 gcloud beta builds triggers import --project golang-org --source deploy/playground_trigger.yaml 39 gcloud beta builds triggers import --project golang-org --source deploy/playground_goprev_trigger.yaml 40 gcloud alpha builds triggers import --project golang-org --source deploy/gotip_scheduled_trigger.yaml 41 @echo "$$GOTIP_MESSAGE" 42 43 pull-cloudbuild-triggers: 44 gcloud beta builds triggers export --project golang-org playground-redeploy-go-release --destination deploy/go_trigger.yaml 45 gcloud beta builds triggers export --project golang-org playground-redeploy-goprev-go-release --destination deploy/go_goprev_trigger.yaml 46 gcloud beta builds triggers export --project golang-org playground-redeploy-playground --destination deploy/playground_trigger.yaml 47 gcloud beta builds triggers export --project golang-org playground-redeploy-goprev-playground --destination deploy/playground_goprev_trigger.yaml 48 gcloud alpha builds triggers export --project golang-org playground-deploy-gotip-playground --destination deploy/gotip_scheduled_trigger.yaml 49 gcloud scheduler --project=golang-org jobs describe --format=yaml playground-deploy-gotip-playground-schedule > deploy/gotip_schedule.yaml