ci: move build scratch off node runtime storage
All checks were successful
Tests / Declarative: Post Actions passed: 155
All checks were successful
Tests / Declarative: Post Actions passed: 155
This commit is contained in:
parent
7e64d5332b
commit
ef9e79737c
18
Jenkinsfile
vendored
18
Jenkinsfile
vendored
@ -1,11 +1,16 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
kubernetes {
|
kubernetes {
|
||||||
|
// Keep build I/O off the node's runtime USB drive.
|
||||||
|
workspaceVolume dynamicPVC(accessModes: 'ReadWriteOnce', requestsSize: '20Gi', storageClassName: 'ci-scratch')
|
||||||
defaultContainer 'go-tester'
|
defaultContainer 'go-tester'
|
||||||
yaml """
|
yaml """
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
spec:
|
spec:
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 1000
|
||||||
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
nodeSelector: {kubernetes.io/arch: arm64, node-role.kubernetes.io/worker: "true"}
|
nodeSelector: {kubernetes.io/arch: arm64, node-role.kubernetes.io/worker: "true"}
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
@ -46,11 +51,17 @@ spec:
|
|||||||
command: ["cat"]
|
command: ["cat"]
|
||||||
tty: true
|
tty: true
|
||||||
volumeMounts: [{name: workspace-volume, mountPath: /home/jenkins/agent}]
|
volumeMounts: [{name: workspace-volume, mountPath: /home/jenkins/agent}]
|
||||||
volumes: [{name: workspace-volume, emptyDir: {}}]
|
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
|
PIP_CACHE_DIR = '/home/jenkins/agent/.cache/pip'
|
||||||
|
NPM_CONFIG_CACHE = '/home/jenkins/agent/.cache/npm'
|
||||||
|
SONAR_USER_HOME = '/home/jenkins/agent/.cache/sonar'
|
||||||
|
TMPDIR = '/home/jenkins/agent/.cache/tmp'
|
||||||
|
GOCACHE = '/home/jenkins/agent/.cache/go-build'
|
||||||
|
GOMODCACHE = '/home/jenkins/agent/.cache/go-mod'
|
||||||
|
GOTMPDIR = '/home/jenkins/agent/.cache/go-tmp'
|
||||||
SUITE_NAME = 'pegasus'
|
SUITE_NAME = 'pegasus'
|
||||||
PUSHGATEWAY_URL = 'http://platform-quality-gateway.monitoring.svc.cluster.local:9091'
|
PUSHGATEWAY_URL = 'http://platform-quality-gateway.monitoring.svc.cluster.local:9091'
|
||||||
SONARQUBE_HOST_URL = 'http://sonarqube.quality.svc.cluster.local:9000'
|
SONARQUBE_HOST_URL = 'http://sonarqube.quality.svc.cluster.local:9000'
|
||||||
@ -70,6 +81,11 @@ spec:
|
|||||||
pollSCM('H/5 * * * *')
|
pollSCM('H/5 * * * *')
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
stage('Prepare build scratch') {
|
||||||
|
steps {
|
||||||
|
sh 'mkdir -p /home/jenkins/agent/.cache/tmp /home/jenkins/agent/.cache/go-tmp'
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
steps {
|
steps {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user