blob: d37d803abdc3c7178e8f804d09d4d43c4667335a [file] [log] [blame]
{
"id": "5a2c9e25-a71a-4adf-a785-76c3eca2ac8a",
"description": "Go repository release trigger for x/playground",
"github": {
"name": "go",
"owner": "golang",
"push": {
"tag": "^go[0-9](\\.[0-9]+)+$"
}
},
"build": {
"steps": [
{
"name": "gcr.io/cloud-builders/git",
"args": [
"clone",
"--depth",
"1",
"https://go.googlesource.com/playground"
]
},
{
"name": "golang",
"entrypoint": "bash",
"args": [
"-c",
"go get golang.org/x/build/maintner/maintq && cp /go/bin/maintq /workspace/maintq"
]
},
{
"name": "debian:stretch",
"entrypoint": "bash",
"args": [
"-c",
"apt-get update && apt-get install -y ca-certificates && ./maintq list-releases | head -n 1 | sed -re 's/^.*tag_name:\"(go[0-9](\\.[0-9]+)+)\".*$/\\1/g' > /workspace/latestgo"
]
},
{
"dir": "playground",
"name": "gcr.io/cloud-builders/docker",
"entrypoint": "bash",
"args": [
"-c",
"docker build --build-arg GO_VERSION=`cat /workspace/latestgo` -t gcr.io/$PROJECT_ID/playground ."
]
},
{
"dir": "playground",
"name": "gcr.io/cloud-builders/gcloud",
"args": [
"app",
"deploy",
"app.yaml",
"--project=$PROJECT_ID",
"--image-url=gcr.io/$PROJECT_ID/playground:latest"
]
}
],
"timeout": "1800s",
"images": [
"gcr.io/$PROJECT_ID/playground"
]
}
}