1
0
Fork 0

Merge pull request #165 from google/new-buildkite-agent

Add new deployment for agent that will do premerge checks
This commit is contained in:
Mikhail Goncharov 2020-04-22 12:13:47 +02:00 committed by GitHub
commit 3b1a04057a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 15 deletions

View file

@ -45,9 +45,9 @@ ENV CCACHE_PATH=/mnt/disks/ssd0/ccache
# configure locale # configure locale
RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\ RUN sed --in-place '/en_US.UTF-8/s/^#//' /etc/locale.gen ;\
locale-gen locale-gen
ENV LANG en_US.UTF-8 ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
# buildkite # buildkite
RUN apt-get install -y apt-transport-https gnupg;\ RUN apt-get install -y apt-transport-https gnupg;\
@ -56,7 +56,5 @@ RUN apt-get install -y apt-transport-https gnupg;\
apt-get update ;\ apt-get update ;\
apt-get install -y buildkite-agent apt-get install -y buildkite-agent
VOLUME /credentials
CMD ["/scripts/start_agent.sh"] CMD ["/scripts/start_agent.sh"]

View file

@ -28,5 +28,4 @@ chown -R ${USER}:${USER} "${CCACHE_PATH}"
# TODO(kuhnel): wipe the disk(s) on startup # TODO(kuhnel): wipe the disk(s) on startup
# start the buildkite agent # start the buildkite agent
su buildkite-agent -c "buildkite-agent start --tags \"os=linux\" --build-path=/mnt/disks/ssd0/agent \ su buildkite-agent -c "buildkite-agent start --build-path=/mnt/disks/ssd0/agent"
--token `cat /credentials/buildkite-token`"

View file

@ -25,8 +25,8 @@ spec:
app: agent-debian-testing-clang8-buildkite app: agent-debian-testing-clang8-buildkite
spec: spec:
containers: containers:
- name: agent-debian-testing-clang8-buildkite - name: agent-debian-testing-buildkite
image: gcr.io/llvm-premerge-checks/agent-debian-testing-clang8-buildkite image: gcr.io/llvm-premerge-checks/agent-debian-testing-buildkite
ports: ports:
- containerPort: 22 - containerPort: 22
resources: resources:
@ -39,16 +39,19 @@ spec:
volumeMounts: volumeMounts:
- name: ssd - name: ssd
mountPath: /mnt/disks/ssd0 mountPath: /mnt/disks/ssd0
- name: credentials env:
mountPath: /credentials - name: BUILDKITE_AGENT_TOKEN
valueFrom:
secretKeyRef:
name: agent-token
key: token
- name: BUILDKITE_AGENT_TAGS
value: "queue=release,os=linux"
volumes: volumes:
- name: ssd - name: ssd
hostPath: hostPath:
# directory location on host # directory location on host
path: /mnt/disks/ssd0 path: /mnt/disks/ssd0
type: Directory type: Directory
- name: credentials
secret:
secretName: buildkite-token
nodeSelector: nodeSelector:
cloud.google.com/gke-nodepool: jenkins-agents cloud.google.com/gke-nodepool: jenkins-agents

View file

@ -0,0 +1,55 @@
# Copyright 2019 Google LLC
#
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: agent-premerge-debian
namespace: buildkite
spec:
replicas: 1
template:
metadata:
labels:
app: agent-premerge-debian
spec:
containers:
- name: agent-debian-testing-buildkite
image: gcr.io/llvm-premerge-checks/agent-debian-testing-buildkite
resources:
limits:
cpu: 30
memory: 45Gi
requests:
cpu: 30
memory: 45Gi
volumeMounts:
- name: ssd
mountPath: /mnt/disks/ssd0
env:
- name: BUILDKITE_AGENT_TOKEN
valueFrom:
secretKeyRef:
name: agent-token
key: token
- name: BUILDKITE_AGENT_TAGS
value: "queue=premerge,os=linux"
volumes:
- name: ssd
hostPath:
# directory location on host
path: /mnt/disks/ssd0
type: Directory
nodeSelector:
cloud.google.com/gke-nodepool: jenkins-agents