Set build number for Jenkins workflow (pipeline) builds

后端 未结 5 1251
野趣味
野趣味 2021-02-05 09:57

I am migrating jenkins-workflow job to new template based workflow job. Because the build number is used as part of the version of build artifacts the workflow produces I have

5条回答
  •  暖寄归人
    2021-02-05 10:31

    I also found another way of doing this by using 'jenkins-cli'. It works for locked down installations where access to script console is not available (Cloudbees Enterprise Jenkins)

    java -jar jenkins-cli.jar   -s https://instanceURL/ \
              set-next-build-number workflow-name  33
    

提交回复
热议问题