Why there is no Source Code Management tab in a Jenkins pipeline job?
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).
In the Pipeline definition you can select Pipeline script from SCM
. That will open SCM configuration. Yeah, it's not the most intuitive way.