From 815624b3835f16d78482e1c5af7e2d25cabdc94a Mon Sep 17 00:00:00 2001 From: newrain001 Date: Wed, 21 Aug 2024 10:08:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'cloud/Jenkinsfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloud/Jenkinsfile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) 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 """