以下解决方案对我有效:
pipeline { agent { node { label 'master' customWorkspace "${env.JobPath}" } } stages { stage('Start') { steps { sh 'ls' } } stage ('Invoke_pipeline') { steps { build job: 'pipeline1', parameters: [ string(name: 'param1', value: "value1") ] } } stage('End') { steps { sh 'ls' } } }}在此处添加“管道:构建步骤”官方文档的链接:https : //jenkins.io/doc/pipeline/steps/pipeline-build-
step/



