topr
topr

Reputation: 4622

Why there is no Source Code Management tab in a Jenkins pipeline job?

I've just installed the pipeline plugin (on Jenkins 2.1). When I create a new job the Source Code Management tab is missing (and a few others). According to the article describing the Pipeline feature at it should look like: Source Code Management tab

However this is how it looks like in my case: enter image description here

Where are the missing tabs, especially the Source Code Management one? Is it simply some missing config/plugin or a bug?

I'm on Jenkins 2.1

Upvotes: 25

Views: 32478

Answers (3)

juzzlin
juzzlin

Reputation: 47885

In the Pipeline definition you can select Pipeline script from SCM. That will open SCM configuration. Yeah, it's not the most intuitive way.

Upvotes: 9

Sunil Vishnu Raskar
Sunil Vishnu Raskar

Reputation: 138

The Source Code management tab is available with the Free style project Or Multi- configuration project for the version 2.107.3

Please make sure that when you start a new job you choose right project to see the source code Management tab. Jenkins > New Item > Free Style Project Or Jenkins > New Item > Multi-Configuration project

Upvotes: -1

Stevel
Stevel

Reputation: 699

You may need to install Git plugin (or other SCM connector) before the SCM configuration options will show up. Once it (they) are added to Jenkins, you can continue with the job set up:

In the Pipeline section, select Definition: Pipeline Script from SCM. Additional configuration elements will appear on the page, most notably an SCM drop-down selector. Until you install at least one SCM connector plugin (like Git plugin), that selector will be empty. (Kinda hard to continue with the configuration without the SCM connector you want...)

Once the SCM connector you want is properly plugged-in, the selector becomes populated with the available SCM options. After choosing the one you want, yet more configuration elements show up - whatever the selected SCM requires.

For example, when using git you will see a Repository sub-sub-sub-section where you provide the connection URL and choose an (elsewhere in Jenkins managed) credential. And branch config. And repo-broswer. And more.

After the SCM config bits, there's a configuration of the script file itself, conveniently auto-filled with the default of "Jenkinsfile".

At that point, you should be good to go (presuming you have a Jenkinsfile already pushed to the root of your repo).

Upvotes: 19

Related Questions