Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

like image 977
topr Avatar asked May 17 '16 11:05

topr


People also ask

Why source code management is none in Jenkins?

Search for "Subversion" plugin. Select the "Subversion" plugin from the list and and click on install and restart Jenkins. Go to Job's configuration. Subversion should be listed under SCM (source code management.

Is Jenkins source code management tools?

Q #4) Is Jenkins a source code management tool? Answer: Jenkins, by itself, is not a source code management tool. It's primarily used to set up CI/CD pipelines. It, however, provides integration with a lot of Version Control tools like Git, CVS, and Subversion.

How do I add a pipeline tab in Jenkins?

On the Manage Jenkins page for your installation, navigate to Manage Plugins. Find Pipeline Plugin from among the plugins listed on the Available tab. (You can do this by scrolling through the plugin list or by using “Pipeline” as a term to filter results) Select the checkbox for Pipeline Plugin.


2 Answers

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).

like image 69
Stevel Avatar answered Sep 22 '22 08:09

Stevel


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

like image 25
juzzlin Avatar answered Sep 18 '22 08:09

juzzlin