Skip to content

Commit 00503da

Browse files
authored
Migrate Buildkite CI queues from AWS to GKE (#878)
* Migrate Buildkite CI queues from AWS to GKE * Add comment on buildkite agent installation instructions
1 parent 754a088 commit 00503da

File tree

3 files changed

+103
-29
lines changed

3 files changed

+103
-29
lines changed

.buildkite/pipeline.yml

Lines changed: 97 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,146 @@
1+
container:
2+
kubernetes: &kubernetes
3+
gitEnvFrom:
4+
- secretRef:
5+
name: oss-github-ssh-credentials
6+
sidecars:
7+
- image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-dind:v1
8+
volumeMounts:
9+
- mountPath: /var/run/
10+
name: docker-sock
11+
securityContext:
12+
privileged: true
13+
allowPrivilegeEscalation: true
14+
mirrorVolumeMounts: true # CRITICAL: this must be at the same indentation level as sidecars
15+
podSpec: &podSpec
16+
containers:
17+
- &commandContainer
18+
image: us-west1-docker.pkg.dev/ci-compute/buildkite-images/buildkite-command-container:v2
19+
command:
20+
- |-
21+
echo "Command step was not overridden."
22+
exit 1
23+
volumeMounts:
24+
- mountPath: /var/run/
25+
name: docker-sock
26+
resources:
27+
requests:
28+
cpu: 7500m
29+
memory: 30G
30+
volumes:
31+
- name: docker-sock
32+
emptyDir: {}
33+
34+
agents:
35+
queue: buildkite-gcp
36+
137
steps:
238
- label: "fossa analyze"
3-
agents:
4-
queue: "init"
5-
docker: "*"
6-
command: ".buildkite/scripts/fossa.sh"
39+
plugins:
40+
- kubernetes:
41+
<<: *kubernetes
42+
podSpec:
43+
<<: *podSpec
44+
containers:
45+
- <<: *commandContainer
46+
command:
47+
- |-
48+
.buildkite/scripts/fossa.sh
49+
750
- label: "Lint Check"
8-
agents:
9-
queue: "init"
10-
docker: "*"
11-
command: ".buildkite/scripts/lint.sh"
1251
plugins:
52+
- kubernetes:
53+
<<: *kubernetes
54+
podSpec:
55+
<<: *podSpec
56+
containers:
57+
- <<: *commandContainer
58+
command:
59+
- |-
60+
.buildkite/scripts/lint.sh
1361
- docker-compose#v3.0.0:
1462
run: unit-test-test-service
1563
config: docker/buildkite/docker-compose.yaml
64+
1665
- label: ":java: Unit test with test services"
17-
agents:
18-
queue: "workers"
19-
docker: "*"
20-
command: "./gradlew --no-daemon test jacocoTestReport"
2166
artifact_paths:
2267
- "build/reports/jacoco/test/*.xml"
23-
timeout_in_minutes: 15
68+
timeout_in_minutes: 30
2469
retry:
2570
automatic:
2671
- exit_status: "*"
2772
limit: 3
2873
plugins:
74+
- kubernetes:
75+
<<: *kubernetes
76+
podSpec:
77+
<<: *podSpec
78+
containers:
79+
- <<: *commandContainer
80+
command:
81+
- |-
82+
./gradlew --no-daemon test jacocoTestReport
2983
- docker-compose#v3.0.0:
3084
run: unit-test-test-service
3185
config: docker/buildkite/docker-compose.yaml
3286

3387
- label: ":java: Unit test with docker services sticky on"
34-
agents:
35-
queue: "workers"
36-
docker: "*"
37-
command: "./gradlew --no-daemon test"
38-
timeout_in_minutes: 15
88+
timeout_in_minutes: 30
3989
retry:
4090
automatic:
4191
- exit_status: "*"
4292
limit: 3
4393
plugins:
94+
- kubernetes:
95+
<<: *kubernetes
96+
podSpec:
97+
<<: *podSpec
98+
containers:
99+
- <<: *commandContainer
100+
command:
101+
- |-
102+
./gradlew --no-daemon test
44103
- docker-compose#v3.0.0:
45104
run: unit-test-docker-sticky-on
46105
config: docker/buildkite/docker-compose.yaml
47106

48107
- label: ":java: Unit test with docker services sticky off"
49-
agents:
50-
queue: "workers"
51-
docker: "*"
52-
command: "./gradlew --no-daemon test"
53-
timeout_in_minutes: 15
108+
timeout_in_minutes: 30
54109
retry:
55110
automatic:
56111
- exit_status: "*"
57112
limit: 3
58113
plugins:
114+
- kubernetes:
115+
<<: *kubernetes
116+
podSpec:
117+
<<: *podSpec
118+
containers:
119+
- <<: *commandContainer
120+
command:
121+
- |-
122+
./gradlew --no-daemon test
59123
- docker-compose#v3.0.0:
60124
run: unit-test-docker-sticky-off
61125
config: docker/buildkite/docker-compose.yaml
126+
62127
- wait
63128

64129
- label: ":java: Report test coverage"
65-
agents:
66-
queue: "workers"
67-
docker: "*"
68-
command: ".buildkite/scripts/coverage.sh"
69130
retry:
70131
automatic:
71132
- exit_status: "*"
72133
limit: 3
73134
plugins:
135+
- kubernetes:
136+
<<: *kubernetes
137+
podSpec:
138+
<<: *podSpec
139+
containers:
140+
- <<: *commandContainer
141+
command:
142+
- |-
143+
.buildkite/scripts/coverage.sh
74144
- docker-compose#v3.0.0:
75145
run: test-coverage-report
76146
config: docker/buildkite/docker-compose.yaml

docker/buildkite/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ ENV APACHE_THRIFT_VERSION=0.9.3
99
# Install dependencies using apk
1010
RUN apk update && apk add --virtual wget ca-certificates wget && apk add --virtual build-dependencies build-base gcc
1111
# Git is needed in order to update the dls submodule
12-
RUN apk add git libstdc++
12+
RUN apk add git libstdc++ bash curl
13+
14+
# Install buildkite agent
15+
# https://buildkite.com/docs/agent/v3/linux
16+
RUN bash -c "`curl -sL https://raw.githubusercontent.com/buildkite/agent/main/install.sh`"
17+
RUN ln -s /root/.buildkite-agent/bin/buildkite-agent /usr/bin/buildkite-agent
1318

1419
# Compile source
1520
RUN set -ex ;\

docker/buildkite/docker-compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,3 @@ services:
122122
- COVERALLS_REPO_TOKEN
123123
volumes:
124124
- "../../:/cadence-java-client"
125-
- /usr/bin/buildkite-agent:/usr/bin/buildkite-agent

0 commit comments

Comments
 (0)