1
0
Fork 0
llvm-premerge-checks/kubernetes/jenkins.yaml
ChristianKuehnel de34fb9572
Create docker container for Windows build (#52)
* first steps towards windows builds #25

* added build scripts for windows

* moved from powershell to CMD

* script cleanup

* set up jenkins swarm plugin

* added deployment script for windows

* first draft of jenkins file for windows

* first shot at windows pods

* first draft for buildkite agent

* added call to run_cmake.bat

* added call to run_ninja.bat

* added new buildkite script

* added Dockerfile for buildkite agent

* fixed userprofile path

* added /IncludeOptional for VS

I hope that includes all required libraries

* moved work folder to W:

* added git config for long file names

* added more CMake flags

* setting x64 bit arch in a different way

* and yet another way to set 64bit

* merged buildkite changes to jenkins scripts

* hiding license in batch script runs

* running release build

* added test xml log

* compilation is working, but not all tests

* cmake is in patch now

* updated the dependencies from buildkite config

* dockerfile cleanup

* change how git handles line endings

* updated comment

* performance improvment for volume

* changed workdir folder

* using gnuwin package

split installation into separate layers to speed up incremental changes
2019-11-26 17:10:30 +01:00

229 lines
No EOL
5.1 KiB
YAML

# 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: v1
kind: Namespace
metadata:
name: jenkins
labels:
name: jenkins
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: default
namespace: jenkins
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: jenkins-admin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: default
namespace: jenkins
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: jenkins-home
labels:
failure-domain.beta.kubernetes.io/zone: us-central1-a
spec:
capacity:
storage: 20Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
gcePersistentDisk:
pdName: jenkins-home
fsType: ext4
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jenkins
namespace: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: master
spec:
hostname: jenkins-master
containers:
- name: master
image: gcr.io/llvm-premerge-checks/jenkins-master
ports:
- containerPort: 8080
- containerPort: 50000
readinessProbe:
httpGet:
path: /login
port: 8080
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 2
failureThreshold: 5
env:
- name: JAVA_OPTS
value: '-Xmx1400m'
volumeMounts:
- mountPath: /var/jenkins_home
name: jenkins-home
resources:
limits:
cpu: 500m
memory: 1500Mi
requests:
cpu: 500m
memory: 1500Mi
volumes:
- name: jenkins-home
gcePersistentDisk:
pdName: jenkins-home
fsType: ext4
nodeSelector:
cloud.google.com/gke-nodepool: default-pool
---
kind: Service
apiVersion: v1
metadata:
name: jenkins-ui
namespace: jenkins
spec:
type: NodePort
selector:
app: master
ports:
- protocol: TCP
port: 8080
targetPort: 8080
name: ui
- protocol: TCP
port: 50000
targetPort: 50000
name: agent
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-jenkins
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
nfs:
server: nfs-service.results.svc.cluster.local
path: "/exports"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: nfs-jenkins
namespace: jenkins
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: agent-debian-testing-clang8-ssd
namespace: jenkins
spec:
replicas: 2
template:
metadata:
labels:
app: agent-debian-testing-clang8-ssd
spec:
containers:
- name: agent-debian-testing-clang8
image: gcr.io/llvm-premerge-checks/agent-debian-testing-clang8-ssd
ports:
- containerPort: 22
resources:
limits:
cpu: 30
memory: 45Gi
requests:
cpu: 30
memory: 45Gi
volumeMounts:
- name: nfs-pvc
mountPath: /mnt/nfs
- name: ssd
mountPath: /mnt/disks/ssd0
volumes:
- name: nfs-pvc
persistentVolumeClaim:
claimName: nfs-jenkins
- name: ssd
hostPath:
# directory location on host
path: /mnt/disks/ssd0
type: Directory
nodeSelector:
cloud.google.com/gke-nodepool: jenkins-agents
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: agent-windows-visualstudio2017-ssd
namespace: jenkins
spec:
replicas: 1
template:
metadata:
labels:
app: agent-windows-visualstudio2017-ssd
spec:
containers:
- name: agent-windows-visualstudio2017-ssd
image: gcr.io/llvm-premerge-checks/agent-windows
resources:
limits:
cpu: 14
memory: 20Gi
requests:
cpu: 14
memory: 20Gi
# volumeMounts:
# - name: nfs-pvc
# mountPath: /mnt/nfs
# - name: ssd
# mountPath: /mnt/disks/ssd0
# volumes:
# - name: nfs-pvc
# persistentVolumeClaim:
# claimName: nfs-jenkins
# - name: ssd
# hostPath:
# # directory location on host
# path: /mnt/disks/ssd0
# type: Directory
nodeSelector:
cloud.google.com/gke-nodepool: jenkins-agents