<blockquote>
<p>When creating the Jenkinsfile for a pipeline (using groovy) how is the code structure made? Where can I find some examples starting from the easiest to the complex ones?</p>
</blockquote>
<p>The files typically ending in <code>*.jenkinsfile</code> can be made in any text editor or IDE. For examples the best place to look is the <a href="https://www.jenkins.io/doc/pipeline/examples/" rel="nofollow noreferrer">Pipeline Examples</a> page. There is also a github repo with more <a href="https://github.com/jenkinsci/pipeline-examples" rel="nofollow noreferrer">examples</a>.</p>
<blockquote>
<p>What are the actual differences between stages and nodes on Jenkinks file?</p>
</blockquote>
<p><strong>Nodes</strong> - are physical machines or virtual machines that run Jenkins as worker. They can be different architectures.</p>
<p><strong>Stages</strong> - These are best thought of as the recipe:</p>
<ol>
<li>Mix the ingredients</li>
<li>Add water</li>
<li>Mix again</li>
<li>Bake</li>
</ol>
<p>Each stage is an action that Jenkins needs to take.</p>
<blockquote>
<p>Where can I learn how to make pipelines from scratch (but not just copy/paste from somewhere, understanding what I'm doing it), i.e.: I want to run a code on the server where I have my Jenkins master every time a fellow coder make a successfully git push</p>
</blockquote>
<p>The first two links I gave are the best way of starting but it's purely subjective. I'd suggest starting simple and then building up from there. In the document you referenced there is also a section on Pipelines which might be the missing step for you.</p>

CC BY-SA 4.0
2020-08-02T02:46:20.070Z
Thanks you very much for the answer, tips and links, I will check them out. I have found a [cool book](https://www.oreilly.com/library/view/jenkins-the-definitive/9781449311155/) to read, Im on it, is a little old but it works for me so far. Thanks again
k.Cyborg
CC BY-SA 4.0
2020-08-01T18:41:28.330Z
2020-08-01T18:41:28.330Z
digital
<p>I need a little help over here:</p>
<p>In every site I seek info to get started using Jenkins (i.e.: <a href="https://devopscube.com/jenkins-2-tutorials-getting-started-guide/" rel="nofollow noreferrer">devopscube</a>) they say is very easy to understand, and theoretically is really simple once you have look into <a href="https://devopscube.com/jenkins-architecture-explained/" rel="nofollow noreferrer">Jenkinks Architecture</a>, but I'm having troubles to understand some concepts and I need a good site/pdf/free book (I'm from Cuba and my access to internet is a little expensive and no way to pay for courses and books :-( ) to read and fully understand, for example:</p>
<ul>
<li>When creating the <strong>Jenkinsfile</strong> for a pipeline (using <strong>groovy</strong>) how is the code structure made? <em>Where</em> can I find some examples starting from the easiest to the complex ones?</li>
<li>What are the actual differences between <strong>stages</strong> and <strong>nodes</strong> on Jenkinks file?</li>
<li>Where can I learn how to make pipelines from scratch (but not just copy/paste from somewhere, understanding what I'm doing it), i.e.: I want to run a code on the server where I have my Jenkins master every time a fellow coder make a successfully <strong>git push</strong></li>
</ul>
<p>I downloaded the <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;ved=2ahUKEwjOxIqTj_nqAhWSmeAKHUZGBRMQFjAAegQIARAB&amp;url=https%3A%2F%2Fwww.jenkins.io%2Fuser-handbook.pdf&amp;usg=AOvVaw1VezHgwXZGSMjEi2nF4VDv" rel="nofollow noreferrer">Jenkis.io's Jenkins User Handbook</a> but is a bit hard to fully understand the questions I made right up.</p>
<p>Thanks</p>

CC BY-SA 4.0
2020-08-08T04:04:35.707Z
I read somewhere that I can't find right now, there were some issues producing the pdf and they may have stopped updating it. Best to refer to the orginal site, https://www.jenkins.io/doc/book/ and the parent, https://www.jenkins.io/doc and the pipeline pages, https://www.jenkins.io/doc/book/pipeline/. Also, there is more jenkins activity on S/O - https://stackoverflow.com/questions/tagged/jenkins
Ian W
<jenkins><documentation>
Need help getting documentation of Jenkins
k.Cyborg
# Need help getting documentation of Jenkins

(Asked by: username_0 on 2020-08-01)

I need a little help over here:

In every site I seek info to get started using Jenkins (i.e.: [devopscube](https://devopscube.com/jenkins-2-tutorials-getting-started-guide/)) they say is very easy to understand, and theoretically is really simple once you have look into [Jenkinks Architecture](https://devopscube.com/jenkins-architecture-explained/), but I'm having troubles to understand some concepts and I need a good site/pdf/free book (I'm from Cuba and my access to internet is a little expensive and no way to pay for courses and books :-( ) to read and fully understand, for example:

* When creating the **Jenkinsfile** for a pipeline (using **groovy**) how is the code structure made? *Where* can I find some examples starting from the easiest to the complex ones?
* What are the actual differences between **stages** and **nodes** on Jenkinks file?
* Where can I learn how to make pipelines from scratch (but not just copy/paste from somewhere, understanding what I'm doing it), i.e.: I want to run a code on the server where I have my Jenkins master every time a fellow coder make a successfully **git push**

I downloaded the [Jenkis.io's Jenkins User Handbook](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjOxIqTj_nqAhWSmeAKHUZGBRMQFjAAegQIARAB&url=https%3A%2F%2Fwww.jenkins.io%2Fuser-handbook.pdf&usg=AOvVaw1VezHgwXZGSMjEi2nF4VDv) but is a bit hard to fully understand the questions I made right up.

Thanks

**Tags:** jenkins, documentation

> **Comments:**
> **username_1**: I read somewhere that I can't find right now, there were some issues producing the pdf and they may have stopped updating it. Best to refer to the orginal site, https://www.jenkins.io/doc/book/ and the parent, https://www.jenkins.io/doc and the pipeline pages, https://www.jenkins.io/doc/book/pipeline/. Also, there is more jenkins activity on S/O - https://stackoverflow.com/questions/tagged/jenkins  

---

## 1 answers

### Answer by username_2 on 2020-08-01. Score: 1 | Accepted answer

> When creating the Jenkinsfile for a pipeline (using groovy) how is the code structure made? Where can I find some examples starting from the easiest to the complex ones?

The files typically ending in `*.jenkinsfile` can be made in any text editor or IDE. For examples the best place to look is the [Pipeline Examples](https://www.jenkins.io/doc/pipeline/examples/) page. There is also a github repo with more [examples](https://github.com/jenkinsci/pipeline-examples).

> What are the actual differences between stages and nodes on Jenkinks file?

**Nodes** - are physical machines or virtual machines that run Jenkins as worker. They can be different architectures.

**Stages** - These are best thought of as the recipe:

1. Mix the ingredients
2. Add water
3. Mix again
4. Bake

Each stage is an action that Jenkins needs to take.

> Where can I learn how to make pipelines from scratch (but not just copy/paste from somewhere, understanding what I'm doing it), i.e.: I want to run a code on the server where I have my Jenkins master every time a fellow coder make a successfully git push

The first two links I gave are the best way of starting but it's purely subjective. I'd suggest starting simple and then building up from there. In the document you referenced there is also a section on Pipelines which might be the missing step for you.

> **Comments:**
> **username_0**: Thanks you very much for the answer, tips and links, I will check them out. I have found a [cool book](https://www.oreilly.com/library/view/jenkins-the-definitive/9781449311155/) to read, Im on it, is a little old but it works for me so far. Thanks again  

---

