Skip to content

Commit 60559de

Browse files
committed
deploy: add triggers for the goprev playground
Change-Id: Icf535d55b2ab042e4badf8b41042c1e3a1480906 Reviewed-on: https://go-review.googlesource.com/c/playground/+/395034 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent 6aeb6d3 commit 60559de

File tree

6 files changed

+46
-4
lines changed

6 files changed

+46
-4
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ export GOTIP_MESSAGE
3434

3535
push-cloudbuild-triggers:
3636
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
3738
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
3840
gcloud alpha builds triggers import --project golang-org --source deploy/gotip_scheduled_trigger.yaml
3941
@echo "$$GOTIP_MESSAGE"
4042

4143
pull-cloudbuild-triggers:
4244
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
4346
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
4448
gcloud alpha builds triggers export --project golang-org playground-deploy-gotip-playground --destination deploy/gotip_scheduled_trigger.yaml
4549
gcloud scheduler --project=golang-org jobs describe --format=yaml playground-deploy-gotip-playground-schedule > deploy/gotip_schedule.yaml

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ For details, see [deploy/go_trigger.yaml](deploy/go_trigger.yaml),
3535
and [deploy/deploy.json](deploy/deploy.json).
3636

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

4040
### Deploy via Cloud Build
4141

deploy/deploy_goprev.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@
3737
]
3838
}
3939
],
40-
"timeout": "3600s"
40+
"timeout": "3600s",
41+
"options": {
42+
"machineType": "N1_HIGHCPU_8"
43+
}
4144
}

deploy/go_goprev_trigger.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
build:
2+
steps:
3+
- args:
4+
- clone
5+
- --depth
6+
- '1'
7+
- https://go.googlesource.com/playground
8+
name: gcr.io/cloud-builders/git
9+
- args:
10+
- builds
11+
- submit
12+
- --async
13+
- --config
14+
- deploy/deploy_goprev.json
15+
- .
16+
dir: playground
17+
name: gcr.io/cloud-builders/gcloud
18+
createTime: '2022-03-23T14:26:03.683560061Z'
19+
description: Redeploy the goprev playground on new tagged Go release
20+
id: 652aa58f-6376-4a89-a881-e5b0ed2ddbba
21+
name: playground-redeploy-goprev-go-release
22+
triggerTemplate:
23+
projectId: golang-org
24+
repoName: go
25+
tagName: ^go[0-9](\.[0-9]+)+$

deploy/gotip_schedule.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ httpTarget:
1010
scope: https://www.googleapis.com/auth/cloud-platform
1111
serviceAccountEmail: cloud-build-trigger-scheduler@golang-org.iam.gserviceaccount.com
1212
uri: https://cloudbuild.googleapis.com/v1/projects/golang-org/triggers/b30b6980-4b88-4c10-91d4-5705c793fa1b:run
13-
lastAttemptTime: '2021-11-23T16:22:00.122806Z'
13+
lastAttemptTime: '2022-03-23T14:00:00.657383Z'
1414
name: projects/golang-org/locations/us-central1/jobs/playground-deploy-gotip-playground-schedule
1515
schedule: 0 10 * * *
16-
scheduleTime: '2021-11-24T15:00:00Z'
16+
scheduleTime: '2022-03-24T14:00:00.140242Z'
1717
state: ENABLED
18+
status: {}
1819
timeZone: America/New_York
1920
userUpdateTime: '2021-11-23T16:27:07Z'

deploy/playground_goprev_trigger.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
createTime: '2022-03-23T14:30:37.556961257Z'
2+
description: Redeploy the goprev playground on x/playground commit
3+
filename: deploy/deploy_goprev.json
4+
id: 4964e99e-4472-4279-8b92-244cbc5e2cd6
5+
name: playground-redeploy-goprev-playground
6+
triggerTemplate:
7+
branchName: ^master$
8+
projectId: golang-org
9+
repoName: playground

0 commit comments

Comments
 (0)