2

I need a little help over here:

In every site I seek info to get started using Jenkins (i.e.: devopscube) they say is very easy to understand, and theoretically is really simple once you have look into Jenkinks Architecture, 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 but is a bit hard to fully understand the questions I made right up.

Thanks

1

1 Answer 1

1

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 page. There is also a github repo with more 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.

1
  • Thanks you very much for the answer, tips and links, I will check them out. I have found a cool book to read, Im on it, is a little old but it works for me so far. Thanks again
    – k.Cyborg
    Commented Aug 2, 2020 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.