1
0
Fork 0

buildbot agents

This commit is contained in:
Mikhail Goncharov 2023-10-04 13:35:05 +02:00
parent a536f2c048
commit 9ee22a88c9
7 changed files with 36 additions and 14 deletions

View file

@ -83,8 +83,7 @@ RUN groupadd -g 121 runner \
&& mkdir -p /build \
&& chown -R runner:runner /build;
ENTRYPOINT ["entrypoint.sh"]
CMD ["gosu", "runner", "sleep", "infinity"]
# Buildbot worker was started in the background by entrypoint, here we simply
# wait to keep pod running.
CMD ["sleep", "infinity"]

View file

@ -33,5 +33,13 @@ chown -R ${USER}:${USER} "${SCCACHE_DIR}"
chmod oug+rw "${SCCACHE_DIR}"
gosu "$USER" bash -c 'SCCACHE_DIR="${SCCACHE_DIR}" SCCACHE_IDLE_TIMEOUT=0 SCCACHE_CACHE_SIZE=20G sccache --start-server'
# configure buildbot
mkdir -p /build/buildbot
buildbot-worker create-worker /build/buildbot $BUILDBOT_ADDRESS $BUILDBOT_NAME $BUILDBOT_PASSWORD
# TODO: update buildbot information.
chown -R ${USER}:${USER} /build/buildbot
gosu "$USER" bash -c 'CC=clang CXX=clang++ LD=LLD buildbot-worker start /build/buildbot'
# Run with tini to correctly pass exit codes.
exec /usr/bin/tini -g -- $@

View file

@ -114,6 +114,7 @@ RUN choco install -y handle
RUN pip3 install buildbot-worker==2.8.4
COPY start_agent.ps1 c:\scripts\
# COPY start_agent.ps1 c:\scripts\
COPY start.sh c:\scripts\
ENTRYPOINT ["bash", "entrypoint.sh"]
CMD ["bash", "C:\\scripts\\start.sh"]

View file

@ -0,0 +1,5 @@
echo "buildbot windows entrypoint"
mkdir -p /c/ws/buildbbot
$@

View file

@ -7,4 +7,4 @@ $env:SCCACHE_IDLE_TIMEOUT="0"
Remove-Item -Recurse -Force -ErrorAction Ignore $env:SCCACHE_DIR
sccache --start-server
bash -c 'whoami && tail -f'
bash -c 'whoami && sheep infinity'

View file

@ -15,7 +15,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: buildbot-linux-test
name: buildbot-linux
spec:
replicas: 1
strategy:
@ -25,22 +25,22 @@ spec:
type: RollingUpdate
selector:
matchLabels:
app: buildbot-linux-test
app: buildbot-linux
template:
metadata:
labels:
app: buildbot-linux-test
app: buildbot-linux
spec:
containers:
- name: runner
image: gcr.io/llvm-premerge-checks/buildbot-linux:latest
resources:
limits:
cpu: 31
memory: 80Gi
cpu: 55
memory: 200Gi
requests:
cpu: 31
memory: 80Gi
cpu: 55
memory: 200Gi
volumeMounts:
- name: workdir
mountPath: /build
@ -49,9 +49,18 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: BUILDBOT_PASSWORD
valueFrom:
secretKeyRef:
name: buildbot-premerge-linux-1
key: password
- name: BUILDBOT_NAME
value: premerge-linux-1
- name: BUILDBOT_ADDRESS
value: lab.llvm.org:9994
volumes:
- name: workdir
emptyDir: {}
nodeSelector:
cloud.google.com/gke-nodepool: linux-agents-2
cloud.google.com/gke-nodepool: linux-56
terminationGracePeriodSeconds: 30