Jenkins - how to build a specific branch

前端 未结 6 2083
一向
一向 2020-11-28 23:46

This isn\'t as simple as just doing a parametrized build. I\'ve already got a specific build process that will build and deploy whenever any of these branches are pushed to

6条回答
  •  情歌与酒
    2020-11-29 00:18

    Best solution can be:

    Add a string parameter in the existing job

    Then in the Source Code Management section update Branches to build to use the string parameter you defined

    If you see a checkbox labeled Lightweight checkout, make sure it is unchecked.

    The configuration indicated in the images will tell the jenkins job to use master as the default branch, and for manual builds it will ask you to enter branch details (FYI: by default it's set to master)

提交回复
热议问题