Dynamically Fill Jenkins Choice Parameter With Git Branches In a Specified Repo

后端 未结 13 911
离开以前
离开以前 2020-11-29 16:41

I have a parameterized Jenkins job which requires the input of a specific Git branch in a specific Git repo. Currently this parameter is a string parameter.

Is ther

相关标签:
13条回答
  • 2020-11-29 17:45

    Its quite simple using the "Git Parameter Plug-in".

    Add Name like "SELECT_BRANCH" ## Make sure for this variable as this would be used later. Then Parameter Type : Branch

    Then reach out to SCM : Select : Git and branch specifier : ${SELECT_BRANCH}

    To verify, execute below in shell in jenkins:

    echo ${SELECT_BRANCH}

    env.enter image description here

    enter image description here

    0 讨论(0)
提交回复
热议问题