Skip to content

Commit b5a3d7d

Browse files
[CI] Add Buildbot Deployments
This patch adds the buildbot deployments. These are pods designed to run the buildbot worker in the service pool and then spawn jobs onto a node pool inside their own pods. Reviewers: Keenuts, gburgessiv, lnihlen, dschuff, cmtice Reviewed By: cmtice Pull Request: #544
1 parent ac013fd commit b5a3d7d

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

premerge/buildbot_deployment.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: ${ buildbot_name }
5+
namespace: ${ buildbot_namespace }
6+
labels:
7+
app: ${ buildbot_name }
8+
spec:
9+
selector:
10+
matchLabels:
11+
app: ${ buildbot_name }
12+
template:
13+
metadata:
14+
labels:
15+
app: ${ buildbot_name }
16+
spec:
17+
containers:
18+
- name: buildbot
19+
image: ghcr.io/llvm/premerge-buildbot:latest
20+
env:
21+
- name: BUILDBOT_NAME
22+
value: ${ buildbot_name }
23+
- name: BUILDBOT_PASSWORD
24+
valueFrom:
25+
secretKeyRef:
26+
name: ${ secret_name }
27+
key: password
28+
resources:
29+
requests:
30+
memory: "512Mi"
31+
cpu: "500m"
32+
limits:
33+
memory: "1024Mi"
34+
cpu: "750m"

premerge/premerge_resources/main.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,19 @@ resource "helm_release" "github_actions_runner_set_libcxx_next" {
279279
]
280280
}
281281

282+
resource "kubernetes_manifest" "linux_buildbot_deployment" {
283+
manifest = yamldecode(templatefile("buildbot_deployment.yaml", { buildbot_name : var.linux_buildbot_name, buildbot_namespace : "llvm-premerge-linux-buildbot", secret_name : "linux-buildbot-password" }))
284+
285+
depends_on = [kubernetes_namespace.llvm_premerge_linux_buildbot, kubernetes_secret.linux_buildbot_password]
286+
}
287+
288+
# TODO(boomanaiden154): Enable windows buildbots once Linux is stable.
289+
#resource "kubernetes_manifest" "windows_buildbot_deployment" {
290+
# manifest = yamldecode(templatefile("buildbot_deployment.yaml", { buildbot_name : var.windows_buildbot_name, buildbot_namespace : "llvm-premerge-windows-2022-buildbot", secret_name : "windows-buildbot-password" }))
291+
#
292+
# depends_on = [kubernetes_namespace.llvm_premerge_windows_2022_buildbot, kubernetes_secret.windows_buildbot_password]
293+
#}
294+
282295
resource "kubernetes_service_account" "linux_object_cache_ksa" {
283296
metadata {
284297
name = var.linux_runners_kubernetes_service_account_name

zorg/buildbot/builders/annotated/premerge/dispatch_job.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ def start_build_linux(commit_sha: str, k8s_client) -> str:
6464
f"git checkout ${commit_sha}",
6565
"export CC=clang",
6666
"export CXX=clang++",
67-
"expot POSTCOMMIT_CI=1",
68-
'./.ci/monolithic-linux.sh "bolt;clang;clang-tools-extra;flang;libclc;lld;lldb;llvm;mlir;polly" "check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly" "compiler-rt;libc;libcxx;libcxxabi;libunwind" "check-compiler-rt check-libc" "check-cxx check-cxxabi check-unwind" "OFF"'
67+
"export POSTCOMMIT_CI=1",
68+
"echo testing maybe succeded.",
69+
#'./.ci/monolithic-linux.sh "bolt;clang;clang-tools-extra;flang;libclc;lld;lldb;llvm;mlir;polly" "check-bolt check-clang check-clang-cir check-clang-tools check-flang check-lld check-lldb check-llvm check-mlir check-polly" "compiler-rt;libc;libcxx;libcxxabi;libunwind" "check-compiler-rt check-libc" "check-cxx check-cxxabi check-unwind" "OFF"'
6970
"echo BUILD FINISHED",
7071
]
7172
start_build(

0 commit comments

Comments
 (0)