diff --git a/cloud/Jenkinsfile b/cloud/Jenkinsfile index cbdea2d..1824a02 100644 --- a/cloud/Jenkinsfile +++ b/cloud/Jenkinsfile @@ -37,8 +37,9 @@ pipeline { - mountPath: "/etc/localtime" name: "volume-2" readOnly: false - - name: workspace - mountPath: "/home/jenkins/workspace" + - name: workspace-volume + mountPath: "/home/jenkins/agent" + readOnly: false - name: maven image: registry.cn-hangzhou.aliyuncs.com/newrain857/maven:3.6.3-jdk-11 command: ['cat'] @@ -46,15 +47,17 @@ pipeline { volumeMount: - mountPath: "/root/.m2" name: "maven-data" - - name: workspace - mountPath: "/home/jenkins/workspace" + - name: workspace-volume + mountPath: "/home/jenkins/agent" + readOnly: false - name: nodejs image: node:14 command: ['cat'] tty: true volumeMount: - - name: workspace - mountPath: "/home/jenkins/workspace" + - name: workspace-volume + mountPath: "/home/jenkins/agent" + readOnly: false - name: kubectl image: registry.cn-hangzhou.aliyuncs.com/newrain857/kubectl:v1.22.0 imagePullPolicy: IfNotPresent @@ -71,8 +74,9 @@ pipeline { subPath: config name: "kubeconfig" readOnly: false - - name: workspace - mountPath: "/home/jenkins/workspace" + - name: workspace-volume + mountPath: "/home/jenkins/agent" + readOnly: false - name: docker image: registry.cn-hangzhou.aliyuncs.com/newrain857/docker:24.0.0-git command: ['cat'] @@ -81,8 +85,9 @@ pipeline { - mountPath: "/var/run/docker.sock" name: "volume-docker" readOnly: false - - name: workspace - mountPath: "/home/jenkins/workspace" + - name: workspace-volume + mountPath: "/home/jenkins/agent" + readOnly: false volumes: - name: volume-2 hostPath: @@ -102,7 +107,7 @@ pipeline { - name: maven-data hostPath: path: "/mnt/nfs-data/m2" - - name: workspace + - name: workspace-volume hostPath: path: /mnt/nfs-data/jenkins-workspace """