使用 jenkins 的 dry-运行 复选框执行 Maven 发布

Perform Maven Release with dry-run checkbox from jenkins

需要使用像这样的命令来触发其他作业的“执行 Maven 发布”

curl 'https://192.10.160.105/jenkins/view/job/mavwn/m2release/' 
    -H 'Content-Type: application/x-www-form-urlencoded' 
    --data 'releaseVersion=$releaseVersion&developmentVersion=$developmentVersion&json={ releaseVersion: $releaseVersion, developmentVersion: $developmentVersion}&Submit=Schedule+Maven+Release+Build'

中提到

"https://medium.com/@fercalderon/how-to-trigger-a-maven-release-job-from-a-pipeline-job-in-jenkins-6449cf2e6263"

但是在 Maven Jenkins 作业中有 select 的 dry-运行 复选框,如何通过给定的命令 select dry-box 并安排构建?如果有人有任何想法,请分享?提前致谢

你可以这样做 select 触发构建时的复选框

&name=dry-box&value=on

curl 'https://192.10.160.105/jenkins/view/job/mavwn/m2release/' 
-H 'Content-Type: application/x-www-form-urlencoded' 
--data 'releaseVersion=$releaseVersion&developmentVersion=$developmentVersion&name=dry-box&value=on&json={ releaseVersion: $releaseVersion, developmentVersion: $developmentVersion}&Submit=Schedule+Maven+Release+Build'