Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

Commit 238d994

Browse files
author
Jamie Brynes
authored
Fix Buildkite (#40)
1 parent 66fad23 commit 238d994

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.buildkite/hooks/post-checkout

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@
22
set -euo pipefail
33
[[ -n "${DEBUG:-}" ]] && set -x
44

5-
ci/bootstrap.sh
5+
if [[ -z "${BUILDKITE-}" ]]; then
6+
# Local workstations
7+
ci/bootstrap.sh
8+
exit 0
9+
fi
10+
if [[ "${BUILDKITE_AGENT_META_DATA_QUEUE}" != "trigger-pipelines" ]]; then
11+
ci/bootstrap.sh
12+
fi

.buildkite/premerge.steps.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ common: &common
1313
- "environment=production"
1414
- "permission_set=builder"
1515
- "platform=windows"
16-
- "queue=v2-1555079572-898096a2a0311231-------z"
16+
- "queue=v2-1556548819-32d66bca3227c14a-------z"
1717
timeout_in_minutes: 60 # TODO(ENG-548): reduce timeout once agent-cold-start is optimised.
1818
retry:
1919
automatic:
2020
# This is designed to trap and retry failures because agent lost connection. Agent exits with -1 in this case.
2121
- exit_status: -1
2222
limit: 3
23-
23+
# This is designed to trap and retry failures because of a buildkite bug.
24+
- exit_status: 255
25+
limit: 3
26+
# Workaround for flaky Git clones, likely due to - https://github.com/PowerShell/Win32-OpenSSH/issues/1322
27+
- exit_status: 128
28+
limit: 3
29+
2430
# NOTE: step labels turn into commit-status names like {org}/{repo}/{pipeline}/{step-label}, lower-case and hyphenated.
2531
# These are then relied on to have stable names by other things, so once named, please beware renaming has consequences.
2632

.buildkite/release-qa.steps.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ common: &common
1313
- "environment=production"
1414
- "permission_set=builder"
1515
- "platform=windows"
16-
- "queue=v2-1555079572-898096a2a0311231-------z"
16+
- "queue=v2-1556548819-32d66bca3227c14a-------z"
1717
timeout_in_minutes: 60 # TODO(ENG-548): reduce timeout once agent-cold-start is optimised.
1818
retry:
1919
automatic:
2020
# This is designed to trap and retry failures because agent lost connection. Agent exits with -1 in this case.
2121
- exit_status: -1
2222
limit: 3
23+
# This is designed to trap and retry failures because of a buildkite bug.
24+
- exit_status: 255
25+
limit: 3
26+
# Workaround for flaky Git clones, likely due to - https://github.com/PowerShell/Win32-OpenSSH/issues/1322
27+
- exit_status: 128
28+
limit: 3
2329

2430
# NOTE: step labels turn into commit-status names like {org}/{repo}/{pipeline}/{step-label}, lower-case and hyphenated.
2531
# These are then relied on to have stable names by other things, so once named, please beware renaming has consequences.

ci/bootstrap.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if [ -d "${SHARED_CI_DIR}" ]; then
1212
rm -rf "${SHARED_CI_DIR}"
1313
fi
1414

15-
git clone "${CLONE_URL}" "${SHARED_CI_DIR}"
15+
git clone --depth 1 --verbose "${CLONE_URL}" "${SHARED_CI_DIR}"
1616

1717

1818
# Clone the GDK for Unity repository
@@ -23,7 +23,12 @@ PINNED_VERSION=$(cat ./gdk.pinned)
2323

2424
rm -rf "${TARGET_DIRECTORY}"
2525

26-
git clone ${CLONE_URI} "${TARGET_DIRECTORY}"
26+
mkdir "${TARGET_DIRECTORY}"
27+
28+
# Workaround for being unable to clone a specific commit with depth of 1.
2729
pushd "${TARGET_DIRECTORY}"
30+
git init
31+
git remote add origin "${CLONE_URI}"
32+
git fetch --depth 20 origin develop
2833
git checkout "${PINNED_VERSION}"
2934
popd

0 commit comments

Comments
 (0)