Merge pull request #165 from google/new-buildkite-agent
Add new deployment for agent that will do premerge checks
This commit is contained in:
commit
3b1a04057a
4 changed files with 70 additions and 15 deletions
|
@ -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"]
|
||||||
|
|
||||||
|
|
|
@ -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`"
|
|
|
@ -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
|
55
kubernetes/buildkite/agents_premerge.yaml
Normal file
55
kubernetes/buildkite/agents_premerge.yaml
Normal 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
|
Loading…
Reference in a new issue