adbo
adbo

Reputation: 807

How to parameterize checkout of Branch in a Build-Job in Jenkins?

I want to parameterize the checkout of a specific branch in jenkins.

This is what I did:

  1. Clicked This project is parameterized enter image description here

  2. No I want to use this variable in the checkout section: enter image description here

But this doesn't work. The variable isn't resolved by Jenkins.

Any Idea how to do that? Thanks.

Upvotes: 3

Views: 2249

Answers (1)

Marcos
Marcos

Reputation: 575

Disable Lightweight checkout. From the help button next to it:

If selected, try to obtain the Pipeline script contents directly from the SCM without performing a full checkout. The advantage of this mode is its efficiency; however, you will not get any changelogs or polling based on the SCM. (If you use checkout scm during the build, this will populate the changelog and initialize polling.) Also build parameters will not be substituted into SCM configuration in this mode. Only selected SCM plugins support this mode.

Upvotes: 4

Related Questions