Jenkins pipeline to build multiple projects in sequence?

倖福魔咒の 提交于 2020-01-05 07:08:16

问题


I am a novice when it comes to Jenkins. I would like to be able to take different projects and build them in sequence with each other with a Pipeline. I have noticed that Jenkins can run various stages in sequence or in parallel via a Pipeline. Is there a way for this to happen with running projects in sequence or in parallel that exists on the same node?


回答1:


Yes, you can use build step to trigger any project (job) you want in Jenkins. See https://jenkins.io/doc/pipeline/steps/pipeline-build-step/




回答2:


I know this question is a bit old. But in case there's someone out there that might be searching for an answer, follow these steps (Remember the names of the Jobs as you need to type them)

  • Create a "Multijob Project"
  • In the "Build" section, type the Name of your first Job.
  • Again In the "Build" section, "Add build step" type the next Job name.

In both builds, "Block until the triggered projects finish" should be ticked.

Save & Build your Multijob Project.



来源:https://stackoverflow.com/questions/52998433/jenkins-pipeline-to-build-multiple-projects-in-sequence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!