Skip to content

Commit 23c069f

Browse files
mstifflinbiosvs
authored andcommitted
Migrate Buildkite CI queues from AWS to GKE
- Hard code the ssh volume mount name - Downgrade update-deps pipeline docker compose version - Necessary since it will otherwise fail with [/tmp/github-com-buildkite-plugins-docker-compose-buildkite-plugin/hooks/../commands/run.sh: line 99: BUILDKITE_AGENT_ID: unbound variable ](https://buildkite.com/uberopensource/dubstep-core-gcp/builds/10#018ef7c9-9cc5-49e5-b83d-69f1157cc57c/62-64) - Opened a thread with Buildkite support in Slack, but this pipeline isn't using any of the newer docker-compose plugin features so I don't think it needs to be on latest
1 parent 407d76c commit 23c069f

File tree

3 files changed

+164
-66
lines changed

3 files changed

+164
-66
lines changed

.buildkite/pipeline-default.yml

Lines changed: 107 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,122 @@
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:
2-
- name: ":docker: :package: 1.21"
3-
plugins:
4-
docker-compose#v5.2.0:
5-
build: yarpc-go-1.21
6-
push: yarpc-go-1.21:027047743804.dkr.ecr.us-east-2.amazonaws.com/uber:latest
7-
agents:
8-
queue: builders
9-
- name: ":docker: :package: 1.22"
10-
plugins:
11-
docker-compose#v5.2.0:
12-
build: yarpc-go-1.22
13-
push: yarpc-go-1.22:027047743804.dkr.ecr.us-east-2.amazonaws.com/uber:latest
14-
agents:
15-
queue: builders
16-
- wait
1738
- name: ":go: 1.21 test - %n"
18-
command: "make test"
1939
parallelism: 2
2040
plugins:
21-
docker-compose#v5.2.0:
22-
run: yarpc-go-1.21
23-
agents:
24-
queue: workers
41+
- kubernetes:
42+
<<: *kubernetes
43+
podSpec:
44+
<<: *podSpec
45+
containers:
46+
- <<: *commandContainer
47+
command:
48+
- |-
49+
make test
50+
- docker-compose#v3.13.0:
51+
run: yarpc-go-1.21
52+
2553
- name: ":go: 1.21 examples"
26-
command: "make examples"
2754
plugins:
28-
docker-compose#v5.2.0:
29-
run: yarpc-go-1.21
30-
agents:
31-
queue: workers
55+
- kubernetes:
56+
<<: *kubernetes
57+
podSpec:
58+
<<: *podSpec
59+
containers:
60+
- <<: *commandContainer
61+
command:
62+
- |-
63+
make examples
64+
- docker-compose#v3.13.0:
65+
run: yarpc-go-1.21
66+
3267
- name: ":go: 1.22 test - %n"
33-
command: "make codecov"
3468
parallelism: 6
3569
plugins:
36-
docker-compose#v5.2.0:
37-
run: yarpc-go-1.22
38-
agents:
39-
queue: workers
70+
- kubernetes:
71+
<<: *kubernetes
72+
podSpec:
73+
<<: *podSpec
74+
containers:
75+
- <<: *commandContainer
76+
command:
77+
- |-
78+
make codecov
79+
- docker-compose#v3.13.0:
80+
run: yarpc-go-1.22
81+
4082
- name: ":go: 1.22 crossdock"
41-
command: "make crossdock-codecov"
4283
plugins:
43-
docker-compose#v5.2.0:
44-
run: yarpc-go-1.22
45-
agents:
46-
queue: workers
84+
- kubernetes:
85+
<<: *kubernetes
86+
podSpec:
87+
<<: *podSpec
88+
containers:
89+
- <<: *commandContainer
90+
command:
91+
- |-
92+
make crossdock-codecov
93+
- docker-compose#v3.13.0:
94+
run: yarpc-go-1.22
95+
4796
- name: ":go: 1.22 lint"
48-
command: "make lint"
4997
plugins:
50-
docker-compose#v5.2.0:
51-
run: yarpc-go-1.22
52-
agents:
53-
queue: workers
98+
- kubernetes:
99+
<<: *kubernetes
100+
podSpec:
101+
<<: *podSpec
102+
containers:
103+
- <<: *commandContainer
104+
command:
105+
- |-
106+
make lint
107+
- docker-compose#v3.13.0:
108+
run: yarpc-go-1.22
109+
54110
- name: ":go: 1.22 examples"
55-
command: "make examples"
56111
plugins:
57-
docker-compose#v5.2.0:
58-
run: yarpc-go-1.22
59-
agents:
60-
queue: workers
112+
- kubernetes:
113+
<<: *kubernetes
114+
podSpec:
115+
<<: *podSpec
116+
containers:
117+
- <<: *commandContainer
118+
command:
119+
- |-
120+
make examples
121+
- docker-compose#v3.13.0:
122+
run: yarpc-go-1.22
Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,57 @@
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:
2-
- name: ":docker: :package: 1.22"
3-
plugins:
4-
docker-compose#v5.2.0:
5-
build: yarpc-go-1.22
6-
push: yarpc-go-1.22:027047743804.dkr.ecr.us-east-2.amazonaws.com/uber:latest
7-
agents:
8-
queue: builders
9-
- wait
1038
- name: ":go: 1.22 update-deps"
11-
command: "etc/bin/update-deps.sh"
1239
plugins:
13-
docker-compose#v5.2.0:
14-
run: yarpc-go-1.22
15-
env:
16-
# The script needs the following environment variables in addition
17-
# to those provided by the docker-compose.
18-
- GITHUB_USER
19-
- GITHUB_EMAIL
20-
- GITHUB_TOKEN
21-
- GITHUB_REPO
22-
agents:
23-
queue: workers
40+
- kubernetes:
41+
<<: *kubernetes
42+
podSpec:
43+
<<: *podSpec
44+
containers:
45+
- <<: *commandContainer
46+
command:
47+
- |-
48+
etc/bin/update-deps.sh
49+
- docker-compose#v3.0.0:
50+
run: yarpc-go-1.22
51+
env:
52+
# The script needs the following environment variables in addition
53+
# to those provided by the docker-compose.
54+
- GITHUB_USER
55+
- GITHUB_EMAIL
56+
- GITHUB_TOKEN
57+
- GITHUB_REPO

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ services:
1212
- CODECOV_TOKEN
1313
- CI=true
1414
- BUILDKITE
15+
- BUILDKITE_AGENT_ID
1516
- BUILDKITE_BRANCH
1617
- BUILDKITE_BUILD_NUMBER
1718
- BUILDKITE_BUILD_URL
@@ -22,7 +23,7 @@ services:
2223
- GO111MODULE=on
2324
- SSH_AUTH_SOCK=/ssh-agent
2425
volumes:
25-
- $SSH_AUTH_SOCK:/ssh-agent
26+
- /ssh-agent:/ssh-agent
2627
# We mount the host's SSH Agent unix socket at /ssh-agent in the container
2728
# and tell the container where to find it so that the container can
2829
# actually push commits.
@@ -38,6 +39,7 @@ services:
3839
- CODECOV_TOKEN
3940
- CI=true
4041
- BUILDKITE
42+
- BUILDKITE_AGENT_ID
4143
- BUILDKITE_BRANCH
4244
- BUILDKITE_BUILD_NUMBER
4345
- BUILDKITE_BUILD_URL

0 commit comments

Comments
 (0)