Complete Jenkins Pipeline Tutorial | Jenkinsfile explained

46 Comments



In this complete Jenkins Pipeline Tutorial, I explain everything you need to know about Jenkinsfile.

► Subscribe To Me On Youtube: https://bit.ly/2z5rvTV

This complete Jenkins Pipeline Tutorial will help you configure build pipeline for your own project using Jenkinsfile.

Gitlab Link: https://gitlab.com/nanuchi/techworld-js-docker-demo-app/-/blob/dev/Jenkinsfile

▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
0:00 Intro
0:11 What is Jenkinsfile?
0:50 From Scripted to Declarative Pipeline Syntax
2:48 Basic Structure of Jenkinsfile
8:40 Post Build Actions in Jenkinsfile
10:15 Define Conditionals / When expression
12:45 Using Environmental Variables in Jenkinsfile
20:13 Using Tools attribute for making build tools available
22:30 Using Parameters for a Parameterized Build
27:29 Using external Groovy scripts

#devops #jenkins #docker #techworldwithnana #devopstools

▬▬▬▬▬▬ Want to learn more? 🚀 ▬▬▬▬▬▬
Complete Docker and Kubernetes tutorial ► https://bit.ly/2YGeRp9
What is Kubernetes? ► https://youtu.be/VnvRFRk_51k
Docker 🐳 vs Kubernetes ► https://youtu.be/9_s3h_GVzZc
Complete Jenkins Pipeline Tutorial ► https://youtu.be/7KCS70sCoK0

▬▬▬▬▬▬ Courses & Ebooks & Bootcamp 🚀 ▬▬▬▬▬▬
► Become a DevOps Engineer – full educational program 👉🏼 https://bit.ly/3gEwf4V
► Udemy courses – get biggest discounts here 👉🏼 http://bit.ly/2OgvzIO
► Kubernetes 101 – compact and easy-to-read ebook bundle 👉🏼 https://bit.ly/3mPIaiU

▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
Join private Facebook group ► https://bit.ly/32UVSZP
DEV ► https://bit.ly/3h2fqiO
INSTAGRAM ► https://bit.ly/2F3LXYJ
TWITTER ► https://bit.ly/3i54PUB
LINKEDIN ► https://bit.ly/3hWOLVT

source

46 Comments
    • blank
      Amit Joshi
      May 11, 2022 15:18 pm Reply

      How to create Pipeline to deploy to DEV, QA, iAT and prod. DEV should be continuous and QA should be based on QA approval. Same for iAT and Prod environment deploy.

    • blank
      Yogesh Mandlik
      May 11, 2022 15:18 pm Reply

      Thanks Nana such a great and detail video.

    • blank
      Dimas Yudha Pratama
      May 11, 2022 15:18 pm Reply

      It seems that you forgot to add single quote in both username & password variables 18:50 😀

    • blank
      Stephane Boghossian
      May 11, 2022 15:18 pm Reply

      Learn by doing 😉
      You can use http://Brainboard.co to learn Jenkins!
      We also have a Jenkins Templates available for the community to duplicate and scale.

    • blank
      Sateesh Karri
      May 11, 2022 15:18 pm Reply

      I like your explanation Nana and also clear explanation. Do vedios also about real time scenarios about " Production Support " if it is possible.

      Thanks and Regards.
      Sateesh.k

    • blank
      Pankaj Dahiya
      May 11, 2022 15:18 pm Reply

      you missed showing automated pipelines!

    • blank
      abhishek gowlikar
      May 11, 2022 15:18 pm Reply

      Nice explanation.

    • blank
      mohan babu
      May 11, 2022 15:18 pm Reply

      Hi Nana, can you please share how to get variable from a external file like any properties file that got exported from a different job (which got generated from file export plugin).

    • blank
      Ramanamark Suriyamoorthy
      May 11, 2022 15:18 pm Reply

      Can anyone tell me how to configure jdk in scripted pipeline?

    • blank
      Mohamad Eghlima
      May 11, 2022 15:18 pm Reply

      Hi, thanks for this, it was super helpful. I wanted to know if having a large complex Jenkinsfile for all the stages is good or having many Jenkinsfile in another folder in the project for each environment like dev, qa, prod?

      i tried having different Jenkinsfile for each staging server but there were many 'permission denied' issues on our Jenkins jobs output which runs on a linux sever when it sh wants to go two levels up and execute ./gradlew in another folder.

    • blank
      Odda Kussa
      May 11, 2022 15:18 pm Reply

      Nana my hero

    • blank
      EquityHouse
      May 11, 2022 15:18 pm Reply

      Why dont you post a video on how to deploy tags using jenkins file

    • blank
      Evgeny
      May 11, 2022 15:18 pm Reply

      I almost got all you said in this video. I also understood everything you showed in this video. Thank you!

    • blank
      I Bims
      May 11, 2022 15:18 pm Reply

      I've been searching for a good Jenkins Pipeline introduction tutorial for a while now, and I'm happy to say I finally found a really great one! Thanks for it!

      However, I'm still struggling to understand two things: 
      (1) After the build, I upload the build artifacts to an ftp server. That's currently in a post build step. What's the approach with Jenkins pipeline – leave it there or add it to the pipeline script?
      (2) What would be the equivalent of configuring the a Maven release build in Jenkins Pipeline?

    • blank
      DEVOPS
      May 11, 2022 15:18 pm Reply

      Thank you so much Nana!!

    • blank
      Markus
      May 11, 2022 15:18 pm Reply

      Great tutorial!

    • blank
      Jason Goyer
      May 11, 2022 15:18 pm Reply

      the external scripts, where are they located? in workspace or part of git repo?

    • blank
      Chetan Patel
      May 11, 2022 15:18 pm Reply

      Thanks

    • blank
      Chetan Patel
      May 11, 2022 15:18 pm Reply

      Hello, I'd like to say a massive thank you for creating this content. I've learnt more in this video then i've done over the last month with trying to work out how Jenkins and Groovy are used in real world relations. Its clear and concise. I know it takes a lot of time and energy to try and create these videos so keep going.

    • blank
      Stefan Naumoski
      May 11, 2022 15:18 pm Reply

      who said programmers couldn't lay pipe

    • blank
      Yasmin Elderiny
      May 11, 2022 15:18 pm Reply

      Your explanation is very clear and to the point. I just started to understand Jenkins after watching your video.
      Thank you 🌸

    • blank
      Rich Piana
      May 11, 2022 15:18 pm Reply

      I've been using Jenkins for years at an enterprise level, and this video is great conceptual breakdown.

      Some fun things to do are spin up small kubernetes clusters using kind or micro-k8s on top of docker desktop, run full coverage unit tests in go, python, etc, and then tear everything down.

    • blank
      Cosmin Popescu
      May 11, 2022 15:18 pm Reply

      I learned more jenkins from this video then I would from other 5-8 videos. Thanks a lot, your videos are very clear, concise and transparent. It's a perfect rithm for anyone (beginner) watching this.
      Keep up the good work, Nana !

    • blank
      Roboticist programmer
      May 11, 2022 15:18 pm Reply

      Thanks Nana for the good tutorials you made

    • blank
      PapaKing
      May 11, 2022 15:18 pm Reply

      You know the tutorial will be good when this is the channel

    • blank
      Khalid Akhter
      May 11, 2022 15:18 pm Reply

      Nice presentation, great job

    • blank
      omar akki
      May 11, 2022 15:18 pm Reply

      Thanks sister

    • blank
      Lesetja Maribe
      May 11, 2022 15:18 pm Reply

      very easy to understand.., thank you

    • blank
      Praveen’s shortz
      May 11, 2022 15:18 pm Reply

      Hi Nana, I have one question here.
      I have got 1 master and 3 slaves configured. I want to run some stages in master and remaining of them in slaves. How can I built it, if I'm writing them in the stages master is executing the slave jobs.
      And add on to it, I want to utilize the master workspace how can I import it to slave .

      Thanks in advance

    • blank
      Facts Of ÂLLÀH (Al-Šhaheed Services Pvt Ltd)
      May 11, 2022 15:18 pm Reply

      Thank you madam

    • blank
      Manuel Molina
      May 11, 2022 15:18 pm Reply

      Thanks!! It is very helpful!

    • blank
      Tarek Faham
      May 11, 2022 15:18 pm Reply

      Really great tutorial! Thank you!

    • blank
      Vazhikaattum Ganesh Anna
      May 11, 2022 15:18 pm Reply

      Great Video 👍👍👍

    • blank
      Валерий
      May 11, 2022 15:18 pm Reply

      There is a typo in 18:23: should be 'credentialsId' instead of 'credentials' in usernamePassword:

      usernamePassword(credentialsId: 'server-credentials', usernameVariable: USER, passwordVariable: PWD)

    • blank
      Programmer
      May 11, 2022 15:18 pm Reply

      I would love to watch a complete jenkins course from you

    • blank
      Rubén Abraham Paredes Jiménez
      May 11, 2022 15:18 pm Reply

      New sub here, thank you so much for all

    • blank
      Mahesh Patekar
      May 11, 2022 15:18 pm Reply

      Any tutorial on Jenkins and polarion integration?

    • blank
      Nithesh Kumar
      May 11, 2022 15:18 pm Reply

      2:11

    • blank
      ramesh kurumala
      May 11, 2022 15:18 pm Reply

      please run the jenkinsfile.. job is failing please make one more

    • blank
      Mohamed Ibrahim Mustafa
      May 11, 2022 15:18 pm Reply

      Great

    • blank
      rva chaitanya
      May 11, 2022 15:18 pm Reply

      can anyone help me find a API based interaction with Jenkins, ex: get the nodes, build history, failed builds count, etc

    • blank
      George Li
      May 11, 2022 15:18 pm Reply

      amazing videos, thank you so much!

    • blank
      Ashu_&_Risi {Official}
      May 11, 2022 15:18 pm Reply

      You teaching is just awasome nana. Appreciate your hard work for our growth.

    • blank
      Tom Knud
      May 11, 2022 15:18 pm Reply

      Good job, thanks!

    • blank
      Harris J
      May 11, 2022 15:18 pm Reply

      If you would like to have her in complete gratification and have her asking for you to keep going with it, try go'ogling a few of the suggestions by Greyzar Drinbo, you are likely to go for at minimum 30 minutes more than you normally do.

Leave us a comment