|
|
|
@ -21,7 +21,7 @@ pipeline { |
|
|
|
|
CONSOLE_URL = "${params.JENKINS_URL}/job/ruoyi/${BUILD_NUMBER}/console" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
agent { |
|
|
|
|
agent { |
|
|
|
|
kubernetes { |
|
|
|
|
cloud "kubernetes" |
|
|
|
|
yaml """ |
|
|
|
@ -37,11 +37,14 @@ pipeline { |
|
|
|
|
- mountPath: "/etc/localtime" |
|
|
|
|
name: "volume-2" |
|
|
|
|
readOnly: false |
|
|
|
|
- mountPath: "/home/jenkins/agent" # Workspace directory |
|
|
|
|
name: "workspace-volume" |
|
|
|
|
readOnly: false |
|
|
|
|
- name: maven |
|
|
|
|
image: registry.cn-hangzhou.aliyuncs.com/newrain857/maven:3.6.3-jdk-11 |
|
|
|
|
command: ['cat'] |
|
|
|
|
tty: true |
|
|
|
|
volumeMount: |
|
|
|
|
volumeMounts: |
|
|
|
|
- mountPath: "/root/.m2" |
|
|
|
|
name: "maven-data" |
|
|
|
|
readOnly: false |
|
|
|
@ -92,9 +95,13 @@ pipeline { |
|
|
|
|
- name: maven-data |
|
|
|
|
hostPath: |
|
|
|
|
path: "/mnt/nfs-data/m2" |
|
|
|
|
- name: workspace-volume |
|
|
|
|
hostPath: |
|
|
|
|
path: "/mnt/nfs-data/workspace" # NFS directory for workspace |
|
|
|
|
type: DirectoryOrCreate |
|
|
|
|
""" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
stages { |
|
|
|
|
stage('Maven 打包') { |
|
|
|
|