buildbot agents
This commit is contained in:
parent
a536f2c048
commit
9ee22a88c9
7 changed files with 36 additions and 14 deletions
|
@ -83,8 +83,7 @@ RUN groupadd -g 121 runner \
|
||||||
&& mkdir -p /build \
|
&& mkdir -p /build \
|
||||||
&& chown -R runner:runner /build;
|
&& chown -R runner:runner /build;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["entrypoint.sh"]
|
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"]
|
||||||
|
|
|
@ -33,5 +33,13 @@ chown -R ${USER}:${USER} "${SCCACHE_DIR}"
|
||||||
chmod oug+rw "${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'
|
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.
|
# Run with tini to correctly pass exit codes.
|
||||||
exec /usr/bin/tini -g -- $@
|
exec /usr/bin/tini -g -- $@
|
||||||
|
|
|
@ -114,6 +114,7 @@ RUN choco install -y handle
|
||||||
|
|
||||||
RUN pip3 install buildbot-worker==2.8.4
|
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\
|
COPY start.sh c:\scripts\
|
||||||
|
ENTRYPOINT ["bash", "entrypoint.sh"]
|
||||||
CMD ["bash", "C:\\scripts\\start.sh"]
|
CMD ["bash", "C:\\scripts\\start.sh"]
|
5
containers/buildbot-windows/entrypoint.sh
Normal file
5
containers/buildbot-windows/entrypoint.sh
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
echo "buildbot windows entrypoint"
|
||||||
|
|
||||||
|
mkdir -p /c/ws/buildbbot
|
||||||
|
|
||||||
|
$@
|
|
@ -7,4 +7,4 @@ $env:SCCACHE_IDLE_TIMEOUT="0"
|
||||||
Remove-Item -Recurse -Force -ErrorAction Ignore $env:SCCACHE_DIR
|
Remove-Item -Recurse -Force -ErrorAction Ignore $env:SCCACHE_DIR
|
||||||
sccache --start-server
|
sccache --start-server
|
||||||
|
|
||||||
bash -c 'whoami && tail -f'
|
bash -c 'whoami && sheep infinity'
|
|
@ -15,7 +15,7 @@
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: buildbot-linux-test
|
name: buildbot-linux
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -25,22 +25,22 @@ spec:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: buildbot-linux-test
|
app: buildbot-linux
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: buildbot-linux-test
|
app: buildbot-linux
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: runner
|
- name: runner
|
||||||
image: gcr.io/llvm-premerge-checks/buildbot-linux:latest
|
image: gcr.io/llvm-premerge-checks/buildbot-linux:latest
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpu: 31
|
cpu: 55
|
||||||
memory: 80Gi
|
memory: 200Gi
|
||||||
requests:
|
requests:
|
||||||
cpu: 31
|
cpu: 55
|
||||||
memory: 80Gi
|
memory: 200Gi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: workdir
|
- name: workdir
|
||||||
mountPath: /build
|
mountPath: /build
|
||||||
|
@ -49,9 +49,18 @@ spec:
|
||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.name
|
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:
|
volumes:
|
||||||
- name: workdir
|
- name: workdir
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
cloud.google.com/gke-nodepool: linux-agents-2
|
cloud.google.com/gke-nodepool: linux-56
|
||||||
terminationGracePeriodSeconds: 30
|
terminationGracePeriodSeconds: 30
|
Loading…
Reference in a new issue