<p>The good news, is that you absolutely don't have to use that little box to manage your pipeline script.</p>
<p>Jenkins also allows you to <a href="https://www.jenkins.io/doc/book/pipeline/getting-started/#defining-a-pipeline-in-scm" rel="nofollow noreferrer">source your Jenkinsfile from an SCM repository like GitHub</a>, and will even let you automagically import branches as separate jobs with separate Jenkinsfiles per branch using <a href="https://www.jenkins.io/doc/book/pipeline/multibranch/#creating-a-multibranch-pipeline" rel="nofollow noreferrer">multibranch pipelines</a>.</p>
<p>Pipeline scripts are in a language known as Groovy, not Perl or sh or similar. The definitive guides to Groovy are (of course) <a href="https://www.jenkins.io/doc/book/pipeline/syntax/" rel="nofollow noreferrer">the Jenkins reference guide</a> and <a href="http://groovy-lang.org/documentation.html" rel="nofollow noreferrer">the Groovy reference guide</a>.</p>

CC BY-SA 4.0
2021-05-14T04:54:05.260Z
Thank you! Seems so obvious now...I think I was confused because the choices that appear when you choose `Pipeline script from SCM` looked nearly identical to something elsewhere related to the source code of the project issuing a generic webhook...I probably did an awful job explaining that, but thank you: this makes sense now, where previously it didn't.
StoneThrow
CC BY-SA 4.0
2021-05-14T04:48:03.820Z
2021-05-14T04:48:03.820Z
Kyanar
<p>Several tutorials I'm referencing to learn about Jenkins Pipeline scripting guide one to create Jenkins Pipeline jobs as follows:</p>
<ol>
<li>Click <code>New Item</code> in the left pane.<br />
<a href="https://i.sstatic.net/WqVFE.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WqVFE.png" alt="enter image description here" /></a></li>
<li>Click <code>Pipeline</code> and enter an item name.<br />
<a href="https://i.sstatic.net/C0Jfp.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/C0Jfp.png" alt="enter image description here" /></a></li>
<li>Fill out the little <code>Pipeline</code> textbox with your script.<br />
<a href="https://i.sstatic.net/aIk5o.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aIk5o.png" alt="enter image description here" /></a></li>
</ol>
<p><strong>Question: where does this script physically reside?</strong> I don't see anywhere to save a filename -- am I creating <code>foo.sh</code> or <code>/path/to/bar.py</code> or <code>/somewhere/../else/baz.pl</code>? <strong>What is the filename and realpath of the script that I type out in that tiny little text box?</strong></p>
<p><strong>Question: is it possible to control the name/location of the Pipeline script that I type in that textbox?</strong> E.g. can this script be something version-controlled in some git repo? And specifically, when this job has no build triggers. I can't help but feel that anonymous script edited in that tiny little text box might be limiting for larger and more complicated scripts.</p>
<p>Sorry for the multiple questions; I've tried to limit them and keep their scope all related.</p>

<jenkins><jenkins-pipeline>
Where is Jenkins Pipeline script stored and can I control it?
StoneThrow
# Where is Jenkins Pipeline script stored and can I control it?

(Asked by: username_0 on 2021-05-14)

Several tutorials I'm referencing to learn about Jenkins Pipeline scripting guide one to create Jenkins Pipeline jobs as follows:

1. Click `New Item` in the left pane.  
   [![enter image description here](https://i.sstatic.net/WqVFE.png)](https://i.sstatic.net/WqVFE.png)
2. Click `Pipeline` and enter an item name.  
   [![enter image description here](https://i.sstatic.net/C0Jfp.png)](https://i.sstatic.net/C0Jfp.png)
3. Fill out the little `Pipeline` textbox with your script.  
   [![enter image description here](https://i.sstatic.net/aIk5o.png)](https://i.sstatic.net/aIk5o.png)

**Question: where does this script physically reside?** I don't see anywhere to save a filename -- am I creating `foo.sh` or `/path/to/bar.py` or `/somewhere/../else/baz.pl`? **What is the filename and realpath of the script that I type out in that tiny little text box?**

**Question: is it possible to control the name/location of the Pipeline script that I type in that textbox?** E.g. can this script be something version-controlled in some git repo? And specifically, when this job has no build triggers. I can't help but feel that anonymous script edited in that tiny little text box might be limiting for larger and more complicated scripts.

Sorry for the multiple questions; I've tried to limit them and keep their scope all related.

**Tags:** jenkins, jenkins-pipeline


---

## 1 answers

### Answer by username_1 on 2021-05-14. Score: 1 | Accepted answer

The good news, is that you absolutely don't have to use that little box to manage your pipeline script.

Jenkins also allows you to [source your Jenkinsfile from an SCM repository like GitHub](https://www.jenkins.io/doc/book/pipeline/getting-started/#defining-a-pipeline-in-scm), and will even let you automagically import branches as separate jobs with separate Jenkinsfiles per branch using [multibranch pipelines](https://www.jenkins.io/doc/book/pipeline/multibranch/#creating-a-multibranch-pipeline).

Pipeline scripts are in a language known as Groovy, not Perl or sh or similar. The definitive guides to Groovy are (of course) [the Jenkins reference guide](https://www.jenkins.io/doc/book/pipeline/syntax/) and [the Groovy reference guide](http://groovy-lang.org/documentation.html).

> **Comments:**
> **username_0**: Thank you! Seems so obvious now...I think I was confused because the choices that appear when you choose `Pipeline script from SCM` looked nearly identical to something elsewhere related to the source code of the project issuing a generic webhook...I probably did an awful job explaining that, but thank you: this makes sense now, where previously it didn't.  

---

