Skip to content

Commit eb08f0b

Browse files
authored
Changes for GitHub/Cloud Build app integration (googleforgames#3918)
There are now two triggers, a branch build trigger and a PR build trigger. So: * Fix always-be-building to use the branch build trigger * Change the tags on perf test so it's 'perf' instead of 'ci' * Use the 'ci' tag instead of the trigger for the filter when waiting for e2es (there are now two triggers running e2es)
1 parent 205e87e commit eb08f0b

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

build/always/always-be-building.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ steps:
3232
exit 0
3333
fi
3434
echo "== Build queue empty, starting `main` build =="
35-
gcloud builds triggers run da003bb8-e9bb-4983-a556-e77fb92f17ca --branch=main
35+
gcloud builds triggers run 709790cf-29e1-4350-9407-de7cb5b1dc9e --branch=main
3636
tags: [always-be-building]
3737
timeout: 300s # generous time in case builds take a while to list

ci/perf-test-cloudbuild.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ substitutions:
108108
_TEST_DURATION: "10m"
109109
_TEST_CLIENTS: "50"
110110
_TEST_INTERVAL: "1000"
111-
tags: [ci, 'commit-${COMMIT_SHA}']
111+
tags: [perf, 'commit-${COMMIT_SHA}']
112112
timeout: 7200s # 2h
113113
queueTtl: 10800s # 3h
114114
options:

cloudbuild.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,9 @@ steps:
232232
TS='date --utc +%FT%TZ' # e.g. 2023-01-26T13:30:37Z
233233
echo "$(${TS}): Waiting to become oldest running build"
234234
while true; do
235-
# Filter to running builds within the same TRIGGER_NAME. We use the trigger name to
236-
# filter rather than buildTriggerId because there is no substitution available for
237-
# buildTriggerId.
238-
TRIGGER_FILTER="status=WORKING AND substitutions[TRIGGER_NAME]='${TRIGGER_NAME}'"
239-
OLDEST=$(gcloud builds list --filter "${TRIGGER_FILTER}" --format="value(id,startTime)" --sort-by=startTime --limit=1)
235+
# Filter to running builds with tag 'ci', which covers any builds running e2es.
236+
BUILD_FILTER="status=WORKING AND tags='ci'"
237+
OLDEST=$(gcloud builds list --filter "${BUILD_FILTER}" --format="value(id,startTime)" --sort-by=startTime --limit=1)
240238
echo "$(${TS}): Oldest is (id startTime): ${OLDEST}"
241239
if echo ${OLDEST} | grep -q "${BUILD_ID}"; then
242240
echo "$(${TS}): That's us, we're done!"

0 commit comments

Comments
 (0)