I started watching "Cory shaffer's python" tutorials when it had 406 views. Now, after 2 years, i became a python developer and Cory became a gem of RUclips python community. I can see another upcoming teacher in you. Really good video quality, grate explanation. Suggestion : If you are appearing on screen try to be bit more pleasant. :)
Thank you so much, Ashwin, for an insightful comment! 👍 I do my best to apply small improvements to every new video, and I'm more than happy to get feedback from people I create those videos for - the audience. Let me know if you have any advice on what to improve or what kind of content you would appreciate most. I published this video 4 months ago, and since then, I created several more videos - please let me know if you see any improvements in the latest productions. 😉 Thanks in advance! I'm looking forward to hearing from you.
Well done Syzmon, clear and concise - and it's a subject where you absolutely, positively need to see worked examples. Really wish the Jenkins project would link to this video from their declarative/scripted pipeline part in the online docs. And yeah, you sold me on declarative! ;)
Thank you so much for your kind words, Robert 🙏 I hope I will manage to do some new content around Jenkins in the near future to help the community build rock-solid CI/CD workflows. Wish me good luck :) Take care, and have a good day!
Hello! Thank you for the well explained video! Please let me know what GUI did you used in the presentation during jobs running (the webGUI with the green color were you can visualize the executions of the stages...). Thank you!
Thanks for your kind words, Marian! The GUI you can see in the video is provided by the Blue Ocean UI plugin. You can install it from the Jenkins Plugin Manager. Good luck, and have a good day!
Thank you for this excellent video. I hope you will publish more. May I ask some questions, please ? 1) I had always thought one has to follow Scripted Pipeline syntax in the Jenkins GUI and use Declarative Pipeline syntax in the Jenkins file. Having watched this video I understand one can use either one at probably both places. Right ? 2) Is it so that Blue Ocean can actually only properly parse Declarative Pipeline syntax in order to propose re-launching a pipeline run at an intermediate step. Is this a correct understanding ? 3) You say that Declarative Pipeline syntax is opinionated. In which way ? I do not understand this. Can you explain, please ? 4) Do you see any reason why one should opt for Scripted Pipeline at all when beginning setting up a pipeline ? 5) "Scripted Pipeline" is actually only an evolution of Pipeline description from UI to code. I just wonder why the next step is called "Declarative Pipeline". What make this new concept "declarative" ?
Rainer, thank you so much for the very interesting comment! I haven't noticed that RUclips marked it as potential spam, so I had to accept it in the RUclips Studio panel. Lesson learned. I thought that you have removed it, but I still had it in my e-mail notification message. Anyway, I have recorded a video that answers questions you have asked. You can check it out here - ruclips.net/video/Dfx_VZuJ0Ps/видео.html Thanks once again, and sorry for keeping your comment in moderation so long. I need to pay more attention to what RUclips marks as a potential spam.
Thank you Szymon, Nice explanation with examples. Could you please make a session on passing out put from groovy function to Jenkins declarative pipeline as a global environment variable. I am trying to pass ArrayList type of variable from groovy function to the Jenkins declarative pipeline, it is then converting to the String class object and getting error. Could you please suggest me, how to convert String class object to the ArrayList in global environement block of the Jenkins pipeline.
I would suggest rethinking your problem and maybe trying to apply a different solution. Env variables always convert set value to its String representation, so storing more complex objects this way is not a good choice. Good luck, and have a good day!
Video is really well made... In my case, we use freestyle jobs which calls PowerShell file present in the server and internally other PowerShell is run. I want to convert that into Pipeline as code so should I use declarative or Scripted pipeline ?
It depends, but whatever pipeline type you chose at the beginning, you can always easily convert one pipeline syntax to another. There is a powershell pipeline step (jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#powershell-powershell-script) which can be used in both, scripted and declarative pipeline.
Mate! u r videos are the most interesting and useful tutorials which I've ever watched from very start to very end without skipping even a second. with that background music, it's like biking explaining Jenkins to his clan :) awesome !!! very useful!!! Keep it up mate, u r explaining methods are superb
That's explained precisely, thanks a lot for sharing Szymon. I got stuck in a use case while creating Jenkins pipeline for build upgrade on multiple remote machines over ssh, I'm hoping that you'd help me on this to solve, please let me know the convenient way to reach out to you. Thank you in advance.
Thanks for the kind words, Mohammad. Elaborate in the comment about your specific issue. I will see if there is anything I can help you with. Have a good day!
Well, tbh I was hoping nothing after some time looking how to introduce myself into this Jenkinsfile world, but I found everything I didn't know I was looking for, this is one of my favorite sources to learn from… thank you very much @Szymon.
Hi @Szymon, Great video, because you shown the differences by doing actual hands-on. You practice what you preach, well at least in coding :-). Sorry if it's not funny. "Any idea when Jenkins introduced the Declarative pipeline?"
Thanks for your kind words, Sagar! Regarding your question, here is the release page (with all dates you might be interested in) of the "Pipeline: Declarative" plugin that adds the pipeline feature to Jenkins 2.x - plugins.jenkins.io/pipeline-model-definition/#releases Take care, and have a good day!
Hi, can you do a comparitive explanation between jenkins, github actions and another popular CI tool like Travis/Circle CI/AWS Codepipeline. What are the comon concepts among all of these?
Hi Jay, I can't promise anything. I don't use Jenkins anymore, and if I had to create a comparison video, I would have to check what is the current state of Jenkins pipelines, which is not very likely to happen soon. Take care, and have a good day!
Hello sir, I'm planning to learn Jenkins pipeline and I bumped into your videos. They're very interesting clear and helpful. However do you recommend any tutorials videos of yours that will be longer than the minimum tips and tricks?
Hi there! I recommend checking @techworldwithnana RUclips channel where you can find a lot of very valuable content around DevOps topics, including tutorials on Jenkins Pipelines. Good luck, and happy learning!
Thank you for this informative video.Hope to see a course complete course on Jenkins. I have doubt.I am trying to setup Jenkins on kubernetes. I am using declarative pipeline method for building the jobs.I am able to launch a Slave Pod to which the job is assigned.But i have doubt when a job is running on slave the work-space is created in salve pod.My doubt is if the slave is gone down.then the build data for that job is lost.I am trying to understand what is right way.Should the jobs build data should be saved at a central place or it should be saved on master.
Your question is not related to the video. When it comes to pipeline workspaces, it's easier to accept they are not durable. Depending on what artifacts you build, you should think about publishing them to some central repository (Artifactory, NPM, Docker hub, whatever other technology you use to build.) Using master node to run builds and store workspace is never a good practice. At least this is what I can tell you based on my experience.
Hi Harshitha! I've never watched any video on unit testing Jenkins pipelines, so I can't recommend any specific one. However, I mentioned unit testing pipelines in the "5 Common Jenkins Pipeline Mistakes" video (ruclips.net/video/aFRjn_4nb-Q/видео.html) - you can find some information about PipelineUnitTest, JenkinsfileRunner, and Jenkins-Test-Harness (links are in the description of that video.) I will create a dedicated video on unit testing pipeline code in the near future, stay tuned! 👍 Thanks for the comment, and have a good day!
Nicely done, A start with .. "Hello Stranger ... " caught my attention and background music added to user experience. Concept was nicely explained, with good, short & concise examples. All these made me subscribe to your channel. Good Job (Y)
Szymon, I have been looking for you for more than a year)) you just made my life soo easy..!! Thanks a lot. What you advice to read to start gaining the knowledge that you have? or this is experience based?
Thanks for your kind words, Narek! 👍 Most (if not all) of my Jenkins related knowledge was gained through the real-life experience when I was working at Upwork. I knew the basics of Jenkins, I knew Groovy very well, and I know the CI/CD principles. The rest was just trial-and-error while building the DevOps tools and processes for the engineers. So my advice would to do as many real-life problem solutions as possible, and while doing it, read and learn more about the technology that is related to what you are doing. There is no shortcut imho, and the more troubles you face, and the more of them you will be able to solve, the better expert in the field you become. Good luck, the journey begins!
May be a silly question but that helps me to understand more vibrantly, what is that second screen where we can get an option to Restart Test! Also I wonder where can I get that 2nd graphical screen to select each and every stage that I'm missing in Jenkins Page! Appreciated for your wonderful explanations.
This UI is called Blue Ocean UI. It can be installed as a plugin on existing Jenkins instance - www.jenkins.io/doc/book/blueocean/getting-started/ Have a good day!
One of the best clear explanation I ever watched. I have one scenario: in declarative pipeline I want to print each stage output in last stage can you please help me here Thanks in advance
Hi Ramarao! Thanks for the kind words. Regarding your question, I would start by asking the following question: why would you do that? If I understand you correctly, you would like to capture the output of every stage and print it in the last stage. Correct? If so, I don't know how it could be possible. Whenever you call e.g. "echo" step in a stage, it prints instantly to the output console. I don't know any way to prevent any step from printing to the console, capturing the output differently, and then printing it out in the last stage. If you don't mind - please explain why would you need it. Maybe I will be able to help you and suggest some doable alternative.
@@szymonstepniak Thanks for your quick reply Coming to scenario my pipeline is based on nodejs application,so when we start npm installation it will create output folder and inside that it will generate the content.so here I want to confirm on each stage whether it is created or not, for that I am putting condition on every stage. So my requirement is I want to confirm whether the stage execution happened successfully or not and also print all stages output in last stage. I hope you are clear with my explanation, Please let me know if you need any other details.
@@ramaraokondeti7157 Send me an email please with a real example (remove any sensitive data of course.) I don't understand exactly what is the problem you are trying to solve. If you could show me an example I could tell you if I can help. You can get my email from the information tab on my channel.
Nothing about working with errors. In scripted we can use try-catch-finally, in declarative - post section. BUT i found nothing about 'global post'. I can write stage("Test") { some work} stage("Report") { post {always { ... } } But if i get error in Test stage - i has no methods for catch it in Report stage. Even if i need to send emails and slack notifys, i must duplicate post section to each stage block.
You have "post" block available at both "pipeline" and "stage" level, so you can control the scope of the post action. These 4 differences are not the only differences that exist between declarative and scripted, and I'm not trying to say anywhere that this video explains all existing differences. I hope you didn't get a different impression. Thanks for the comment! 🖒
Hi! Szymon all your videos are detailed and very helpful!! Thanks for sharing with us. Is it possible to post a video/link which shows how to setup IDE with shared library where autocompletion and clicking on the methods takes to the corresponding method etc works. Pipeline gdsl is working fine for me.. I tried few links on the internet I was not able to establish the link with shared library but it is not working. I have seen in one of your declarative pipeline as you type the syntax was getting highlighted.
Hi Chalapathy! Thanks for the kind words. I don't have a working solution for getting code completion with Jenkins Shared Libraries used in the pipeline code. I will be working on a Shared Library oriented video soon and I can promise you that I will explore this area. Stay in touch!
Yes, check "allOf" and "anyOf" blocks that allow you to nest multiple conditions. You can find examples in the documentation page - www.jenkins.io/doc/book/pipeline/syntax/#when
Hi there! Thanks for the comment 👍 Yes, you can expect Jenkins Shared Libraries related content in the upcoming weeks. Is there anything specific you would like to see in such a video? Thanks in advance!
@@szymonstepniak I am looking for usage of share lib in multiple job.If required to override/add any additional step for specific job how can we achieve
Thanks for the detailed answer! It will be covered in the upcoming video. I have 2-3 other in the backlog to create, but then I'm working on the pipeline's video(s). Thanks again and have a good day! 👍
This was a great video, Szymon! I've been looking at Jenkins as a way to further build out our bare metal deployment system at my job (which is lacking a lot of features and requires a lot of monotonous work). When I learned about declarative vs. scripted pipelines my first immediate thought was "ah ha! Let's use scripted so we can change the environment for each customer and each server/rack build". However your showcasing of problems with it and how feature-rich the declarative system have made me re-evaluate that decision if we deploy Jenkins into our ecosystem. I'll be checking out many more of your videos. I haven't checked your channel yet so this question might already be answered but could you do a video on incorporating Jenkins with Ansible for configuration management? Currently we use Ansible so I think it would go over well for my job if we can tether these two technologies together. I'd love to see some example cases of Ansible with Jenkins as resources on the internet seem to be a little lacking. Thanks!
Thank you so much for all the kind words, John! I haven't published a video about building and configuring Jenkins infrastructure on my channel yet, but it is in my backlog already. I don't know if you have heard about Jenkins Configuration as a Code - github.com/jenkinsci/configuration-as-code-plugin This is not Ansible, but it allows you to manage your Jenkins instance configuration through the code you can version in git repository. I will be doing a showcase of this approach in the near future, so stick around :-) Have a good day!
Hi Anirban, I love to hear that, thanks! Btw, is there anything else in the Jenkins Pipeline world that still bothers you and you would like to learn more about? I will be grateful if you could share your thoughts on that. Thanks in advance, have a good day!
@@szymonstepniak 1. Related to plugins when,why & how to use or how much necessary. 2. Dependable pipeline with example using tools like packer & terraform or related to similar operation. Thanks for the reply... maybe I asked too much ; I found video on this topics in this platform but presentation not that much good...so I'm requesting you
@Anirban Sen Thanks a lot for the suggestions, Anirban! 👍 Regarding Jenkins plugins, I was thinking about recording a video with the most useful (in my opinion) plugins worth considering. It's clear that depending on the use case, people will search for different plugins, but there is a subset of generic plugins that everyone can benefit from. Regarding terraform - what specifically have you in mind? There are so many different things terraform can be used for, so I thought I will ask a follow-up question to check if we are on the same page. Thanks in advance, have a good day!
@@szymonstepniak Thanks a lot for considering my suggestion...Incase of Terraform I'm thinking about dynamic cloud infrastructure development perspective...or something like that using some other tools not focused on infra also well enough.
your videos are really awesome...the way you present the content is too good... I am looking for tutorial on "Jenkins Scripted Pipeline with Groovy Script" for beginners but I could not find anything on youtube. It would be great, if you publish a series on Jenkins Scripted Pipeline (using Groovy) for beginners. Thanks in advance !
Thanks for your kind words! I can't promise anything - I haven't used Jenkins for more than a year, and I don't know if I will have enough time to re-invest into producing Jenkins-related content. We will see what the future brings :) Take care, and have a good day!
Yeah, it has Witcher vibe, but it's just one of the royalty free music from the HookSounds library - www.hooksounds.com/royalty-free-music/medieval-mandola/1159526/ :-)
Hi, S BAVAJI! There is no one size fits all, and the question you asked is very broad. I will publish a video that covers full CI/CD pipeline based on Jenkins declarative pipeline syntax in a few weeks, I hope you will find it useful. Have a good day!
Nicely explained bro. I have searched for this for a long time. Thanks for your effort. Please make pipeline with real time scenarios with python scripting.
Hi, André! I don't know if this can be done with the pipeline job. If you go to the "Changes" page in the pipeline job, it only displays git commit refs of changes that were made since the previous build, but there is no diff or detailed view. Maybe there is some Jenkins plugin that adds this feature, but I'm not aware of any.
@@szymonstepniak got it!! thank you =) its easy to do, but you need to set correctly branches path in checkout and you can set triggers { pollSCM('* * * * *') } right below agent {}, it must be inside pipeline {} block.. and then you will be able to check git polling log and see what is being pulled from your last checkout...
Hi Kartik! There is no configuration option to disable restart from stage feature in the declarative pipeline. Some users requested adding one some time ago, but it was never resolved - issues.jenkins-ci.org/browse/JENKINS-54250 Check comments in this Jira issue, some people shared alternative ways to deal with it. Maybe you will find one that works for you. Good luck and have a good day!
Thanks for the comment! I guess this medieval-like music created that vibe :) I hope you liked the video and you've learned something useful from it. Have a good day!
Why does everyone is like: scripted vs declatative - let me tell you why you why you shoudl use declarative! What about scripted ? Cool options tricks ? Did bunch of googling and it seems the answer should be: because noone uses scripted!
It looks like the scripted pipeline is still widely used. I watch the "jenkins-pipeline" tag on StackOverflow, and I see questions with scripted pipelines showing up almost every day. Also, there are still many examples (e.g., on jenkins.io website) that show some pipeline features using scripted pipeline syntax. There is nothing wrong with that, and this video was not made to tell that one is better than another, but just to show a few practical differences instead. I hope you have found something useful in this video. Cheers!
dont know if you realize this,but the commercials are being spliced into critical points totally ruining any transmission of value -- you need to take a ginormous dump into the ads folks mouth once they start explaining the need for this -- we expect to see this crap at either the beginning or end but not in the middle of you making a point - it wrecks our understanding and makes us despise this, which i am sure is ot what you desire in the least.
Thanks a lot for bringing that up. Ads were placed randomly, and you are right - they could affect the flow for people that are watching the video. I managed to move them to the end of the sections, so each example can be consumed without any interruption. Thanks once again, and have a good day!
I started watching "Cory shaffer's python" tutorials when it had 406 views. Now, after 2 years, i became a python developer and Cory became a gem of RUclips python community. I can see another upcoming teacher in you. Really good video quality, grate explanation.
Suggestion : If you are appearing on screen try to be bit more pleasant. :)
Thank you so much, Ashwin, for an insightful comment! 👍 I do my best to apply small improvements to every new video, and I'm more than happy to get feedback from people I create those videos for - the audience. Let me know if you have any advice on what to improve or what kind of content you would appreciate most. I published this video 4 months ago, and since then, I created several more videos - please let me know if you see any improvements in the latest productions. 😉 Thanks in advance! I'm looking forward to hearing from you.
Like the way you started. It's casual but elegant.
Thanks, Sumit! Take care, and have a good day!
Simple and accertive! I'm starting with Jenkins and haven't found an explanation that helped me like this! Thanks a lot!
Thank you! Take care, and have a good day!
➡️ Watch next: Jenkins Pipeline: Scripted OR Declarative? 🤔 - ruclips.net/video/Dfx_VZuJ0Ps/видео.html
Really well explained about the differences, my long lasting confusion got cleared now. It helps me a lot.Thanks to Szymon :)
I'm so glad to hear that. Thanks for letting me know! Good luck and have fun!
Well done Syzmon, clear and concise - and it's a subject where you absolutely, positively need to see worked examples. Really wish the Jenkins project would link to this video from their declarative/scripted pipeline part in the online docs. And yeah, you sold me on declarative! ;)
Sorry, don't know why autocorrect mangled your name Szymon!
Thank you so much for your kind words, Robert 🙏 I hope I will manage to do some new content around Jenkins in the near future to help the community build rock-solid CI/CD workflows. Wish me good luck :) Take care, and have a good day!
High quality video and content. Clear as water!
Congrats
Thanks, Taian! I'm glad to hear you liked it :) Have a good day!
Excellent explaination sir......plz let me know what plugin u hv ysed for this type of ui of jenkins
Thanks for your kind words! This is Blue Ocean UI plugin. Take care, and have a good day!
The way you explained is simply superb
Thank you so much for your kind words! 🙂 Take care, and have a good day!
Hello! Thank you for the well explained video! Please let me know what GUI did you used in the presentation during jobs running (the webGUI with the green color were you can visualize the executions of the stages...). Thank you!
Thanks for your kind words, Marian! The GUI you can see in the video is provided by the Blue Ocean UI plugin. You can install it from the Jenkins Plugin Manager. Good luck, and have a good day!
@@szymonstepniak Thank you again for all the precious info that you share...
If you know Groovy language, then declarative pipeline makes it powerful to implement complex tasks.
Best explanation so far, I already know a little thing about declarative and why was better but your video have much better points.
Thank you for your kind words! Take care, and have a good day!
Thank you for this excellent video. I hope you will publish more.
May I ask some questions, please ?
1) I had always thought one has to follow Scripted Pipeline syntax in the Jenkins GUI and use Declarative Pipeline syntax in the Jenkins file. Having watched this video I understand one can use either one at probably both places. Right ?
2) Is it so that Blue Ocean can actually only properly parse Declarative Pipeline syntax in order to propose re-launching a pipeline run at an intermediate step. Is this a correct understanding ?
3) You say that Declarative Pipeline syntax is opinionated. In which way ? I do not understand this. Can you explain, please ?
4) Do you see any reason why one should opt for Scripted Pipeline at all when beginning setting up a pipeline ?
5) "Scripted Pipeline" is actually only an evolution of Pipeline description from UI to code. I just wonder why the next step is called "Declarative Pipeline". What make this new concept "declarative" ?
Rainer, thank you so much for the very interesting comment! I haven't noticed that RUclips marked it as potential spam, so I had to accept it in the RUclips Studio panel. Lesson learned. I thought that you have removed it, but I still had it in my e-mail notification message. Anyway, I have recorded a video that answers questions you have asked. You can check it out here - ruclips.net/video/Dfx_VZuJ0Ps/видео.html Thanks once again, and sorry for keeping your comment in moderation so long. I need to pay more attention to what RUclips marks as a potential spam.
@@szymonstepniak Hi Szymon, I am sorry for the late reply, I was off in the mountains. I will check asap.
@@rainerhaseneder2480 No need to rush :) Please let me know if the video answered your questions accurately. Take care!
Thank you Szymon, Nice explanation with examples. Could you please make a session on passing out put from groovy function to Jenkins declarative pipeline as a global environment variable. I am trying to pass ArrayList type of variable from groovy function to the Jenkins declarative pipeline, it is then converting to the String class object and getting error. Could you please suggest me, how to convert String class object to the ArrayList in global environement block of the Jenkins pipeline.
I would suggest rethinking your problem and maybe trying to apply a different solution. Env variables always convert set value to its String representation, so storing more complex objects this way is not a good choice. Good luck, and have a good day!
@@szymonstepniak Thank you. Let me know any alternate solution
Video is really well made... In my case, we use freestyle jobs which calls PowerShell file present in the server and internally other PowerShell is run. I want to convert that into Pipeline as code so should I use declarative or Scripted pipeline ?
It depends, but whatever pipeline type you chose at the beginning, you can always easily convert one pipeline syntax to another. There is a powershell pipeline step (jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#powershell-powershell-script) which can be used in both, scripted and declarative pipeline.
Mate! u r videos are the most interesting and useful tutorials which I've ever watched from very start to very end without skipping even a second. with that background music, it's like biking explaining Jenkins to his clan :) awesome !!! very useful!!! Keep it up mate, u r explaining methods are superb
Wow, thank you so much for the kind words, Shan! 😊 I do my best, and more Jenkins related videos coming very soon! Have a good day!
That's explained precisely, thanks a lot for sharing Szymon. I got stuck in a use case while creating Jenkins pipeline for build upgrade on multiple remote machines over ssh, I'm hoping that you'd help me on this to solve, please let me know the convenient way to reach out to you. Thank you in advance.
Thanks for the kind words, Mohammad. Elaborate in the comment about your specific issue. I will see if there is anything I can help you with. Have a good day!
Great. In my case jenkins editor is not showing up. Which config should I change to make it appear. Plugin are already installed.
I think the pipeline-workflow plugin should be enough. Don't know tough, I don't use Jenkins these days. Take care, and have a good day!
Well, tbh I was hoping nothing after some time looking how to introduce myself into this Jenkinsfile world, but I found everything I didn't know I was looking for, this is one of my favorite sources to learn from… thank you very much @Szymon.
Thank you so much for your kind words, Christopher! I'm happy to hear you have found this content useful. Take care, and have a good day!
Love the intro string instruments music!
Thank you! Take care, and have a good day!
Hi @Szymon,
Great video, because you shown the differences by doing actual hands-on. You practice what you preach, well at least in coding :-). Sorry if it's not funny. "Any idea when Jenkins introduced the Declarative pipeline?"
Thanks for your kind words, Sagar! Regarding your question, here is the release page (with all dates you might be interested in) of the "Pipeline: Declarative" plugin that adds the pipeline feature to Jenkins 2.x - plugins.jenkins.io/pipeline-model-definition/#releases Take care, and have a good day!
Hi, can you do a comparitive explanation between jenkins, github actions and another popular CI tool like Travis/Circle CI/AWS Codepipeline. What are the comon concepts among all of these?
Hi Jay, I can't promise anything. I don't use Jenkins anymore, and if I had to create a comparison video, I would have to check what is the current state of Jenkins pipelines, which is not very likely to happen soon. Take care, and have a good day!
Hello sir, I'm planning to learn Jenkins pipeline and I bumped into your videos. They're very interesting clear and helpful. However do you recommend any tutorials videos of yours that will be longer than the minimum tips and tricks?
Hi there! I recommend checking @techworldwithnana RUclips channel where you can find a lot of very valuable content around DevOps topics, including tutorials on Jenkins Pipelines. Good luck, and happy learning!
@@szymonstepniak thank you so much !
Thank you for this informative video.Hope to see a course complete course on Jenkins.
I have doubt.I am trying to setup Jenkins on kubernetes. I am using declarative pipeline method for building the jobs.I am able to launch a Slave Pod to which the job is assigned.But i have doubt when a job is running on slave the work-space is created in salve pod.My doubt is if the slave is gone down.then the build data for that job is lost.I am trying to understand what is right way.Should the jobs build data should be saved at a central place or it should be saved on master.
Your question is not related to the video. When it comes to pipeline workspaces, it's easier to accept they are not durable. Depending on what artifacts you build, you should think about publishing them to some central repository (Artifactory, NPM, Docker hub, whatever other technology you use to build.) Using master node to run builds and store workspace is never a good practice. At least this is what I can tell you based on my experience.
your way of explanation is awsome bro
Thank you so much, Venkat! 😀
Is there any video explaining how to write unit test cases for Jenkins pipeline script and build code?
Hi Harshitha! I've never watched any video on unit testing Jenkins pipelines, so I can't recommend any specific one. However, I mentioned unit testing pipelines in the "5 Common Jenkins Pipeline Mistakes" video (ruclips.net/video/aFRjn_4nb-Q/видео.html) - you can find some information about PipelineUnitTest, JenkinsfileRunner, and Jenkins-Test-Harness (links are in the description of that video.) I will create a dedicated video on unit testing pipeline code in the near future, stay tuned! 👍 Thanks for the comment, and have a good day!
Nicely done, A start with .. "Hello Stranger ... " caught my attention and background music added to user experience. Concept was nicely explained, with good, short & concise examples. All these made me subscribe to your channel. Good Job (Y)
Thank you for your kind words! You are not a stranger anymore - welcome aboard! :D Have a good day!
Nice explanation... I was searching for this.
Glad to hear that :)
Just the video I was looking for, really well explained!! Thanks a lot!!
Glad you liked it!
Thank you sir. Very descriptive and useful!
Thanks for your kind words! Take care, and have a good day!
Great succinct explanation and demonstration.
Thank you so much your kind words, Will! Take care, and have a good day!
Szymon, I have been looking for you for more than a year)) you just made my life soo easy..!! Thanks a lot. What you advice to read to start gaining the knowledge that you have? or this is experience based?
Thanks for your kind words, Narek! 👍 Most (if not all) of my Jenkins related knowledge was gained through the real-life experience when I was working at Upwork. I knew the basics of Jenkins, I knew Groovy very well, and I know the CI/CD principles. The rest was just trial-and-error while building the DevOps tools and processes for the engineers. So my advice would to do as many real-life problem solutions as possible, and while doing it, read and learn more about the technology that is related to what you are doing. There is no shortcut imho, and the more troubles you face, and the more of them you will be able to solve, the better expert in the field you become. Good luck, the journey begins!
@@szymonstepniak Thanks a lot!
May be a silly question but that helps me to understand more vibrantly, what is that second screen where we can get an option to Restart Test! Also I wonder where can I get that 2nd graphical screen to select each and every stage that I'm missing in Jenkins Page! Appreciated for your wonderful explanations.
This UI is called Blue Ocean UI. It can be installed as a plugin on existing Jenkins instance - www.jenkins.io/doc/book/blueocean/getting-started/ Have a good day!
One of the best clear explanation I ever watched.
I have one scenario:
in declarative pipeline I want to print each stage output in last stage
can you please help me here
Thanks in advance
Hi Ramarao! Thanks for the kind words. Regarding your question, I would start by asking the following question: why would you do that? If I understand you correctly, you would like to capture the output of every stage and print it in the last stage. Correct? If so, I don't know how it could be possible. Whenever you call e.g. "echo" step in a stage, it prints instantly to the output console. I don't know any way to prevent any step from printing to the console, capturing the output differently, and then printing it out in the last stage. If you don't mind - please explain why would you need it. Maybe I will be able to help you and suggest some doable alternative.
@@szymonstepniak Thanks for your quick reply
Coming to scenario my pipeline is based on nodejs application,so when we start npm installation it will create output folder and inside that it will generate the content.so here I want to confirm on each stage whether it is created or not, for that I am putting condition on every stage.
So my requirement is I want to confirm whether the stage execution happened successfully or not and also print all stages output in last stage.
I hope you are clear with my explanation, Please let me know if you need any other details.
@@ramaraokondeti7157 Send me an email please with a real example (remove any sensitive data of course.) I don't understand exactly what is the problem you are trying to solve. If you could show me an example I could tell you if I can help. You can get my email from the information tab on my channel.
Very well explained and demonstrated
Thanks, Suresh! I'm happy to hear you liked it 👍
Nothing about working with errors. In scripted we can use try-catch-finally, in declarative - post section. BUT i found nothing about 'global post'. I can write
stage("Test") { some work}
stage("Report") { post {always { ... } }
But if i get error in Test stage - i has no methods for catch it in Report stage. Even if i need to send emails and slack notifys, i must duplicate post section to each stage block.
You have "post" block available at both "pipeline" and "stage" level, so you can control the scope of the post action. These 4 differences are not the only differences that exist between declarative and scripted, and I'm not trying to say anywhere that this video explains all existing differences. I hope you didn't get a different impression. Thanks for the comment! 🖒
I am new to Jenkin but after watching your videos it looks very easy. Thanks Szymon. Channel subscribed. :)
Welcome aboard, Akash! Take care and have a good day!
That was life changing! Thank you! Ps. świetnie mówisz po angielsku :)
Dzięki wielkie za tak ciepłe słowa :) Mam nadzieję, że znajdziesz więcej wartościowych treści w pozostałych materiałach video. Udanego tygodnia!
Hi! Szymon all your videos are detailed and very helpful!! Thanks for sharing with us. Is it possible to post a video/link which shows how to setup IDE with shared library where autocompletion and clicking on the methods takes to the corresponding method etc works. Pipeline gdsl is working fine for me.. I tried few links on the internet I was not able to establish the link with shared library but it is not working. I have seen in one of your declarative pipeline as you type the syntax was getting highlighted.
Hi Chalapathy! Thanks for the kind words. I don't have a working solution for getting code completion with Jenkins Shared Libraries used in the pipeline code. I will be working on a Shared Library oriented video soon and I can promise you that I will explore this area. Stay in touch!
@@szymonstepniak Thank you so much!!
Very informative your videos. Thanks a lot. Keep it up.
Thanks! I'm happy to hear you liked it!
well done syzmon! Great absolutely informative and more learning experience .keep it up bro @Great help
Thank you for your kind words! Take care, and have a good day!
This is a really great explanation.
Thanks for your kind words, Ignat! Take care, and have a good day!
Very well explained, Couldn't be any better!! I really appreciate you efforts
Thank you for your kind words, Shiv! Take care, and have a good day!
nicely explained, it cleared all my doubt. thanks
Thank you so much for your kind words, Mahesh! Take care, and have a good day!
Clear and Crispy - This is really cool! Thanks for such a great content.
Thanks for your kind words! I'm happy to hear you enjoyed it. Have a good day!
Music is really great but just a tad bit too loud in my opinion. Thanks for sharing.
Thanks for sharing your thoughts, Ross! Have a good day!
Thank you for your teaching, Good job !!!
Thank you for your kind words! Take care, and have a good day!
Is it possible to have multiple expressions? or something like OR AND conditionals
Yes, check "allOf" and "anyOf" blocks that allow you to nest multiple conditions. You can find examples in the documentation page - www.jenkins.io/doc/book/pipeline/syntax/#when
awesome..thank you so much for this video..can u pls make video on Jenkins shared libraries
Hi there! Thanks for the comment 👍 Yes, you can expect Jenkins Shared Libraries related content in the upcoming weeks. Is there anything specific you would like to see in such a video? Thanks in advance!
@@szymonstepniak I am looking for usage of share lib in multiple job.If required to override/add any additional step for specific job how can we achieve
Thanks for the detailed answer! It will be covered in the upcoming video. I have 2-3 other in the backlog to create, but then I'm working on the pipeline's video(s). Thanks again and have a good day! 👍
Awesome explanation
Hi Mohammed! I'm glad to hear you liked it :) Have a good day!
This was a great video, Szymon! I've been looking at Jenkins as a way to further build out our bare metal deployment system at my job (which is lacking a lot of features and requires a lot of monotonous work). When I learned about declarative vs. scripted pipelines my first immediate thought was "ah ha! Let's use scripted so we can change the environment for each customer and each server/rack build". However your showcasing of problems with it and how feature-rich the declarative system have made me re-evaluate that decision if we deploy Jenkins into our ecosystem. I'll be checking out many more of your videos.
I haven't checked your channel yet so this question might already be answered but could you do a video on incorporating Jenkins with Ansible for configuration management? Currently we use Ansible so I think it would go over well for my job if we can tether these two technologies together. I'd love to see some example cases of Ansible with Jenkins as resources on the internet seem to be a little lacking.
Thanks!
Thank you so much for all the kind words, John! I haven't published a video about building and configuring Jenkins infrastructure on my channel yet, but it is in my backlog already. I don't know if you have heard about Jenkins Configuration as a Code - github.com/jenkinsci/configuration-as-code-plugin This is not Ansible, but it allows you to manage your Jenkins instance configuration through the code you can version in git repository. I will be doing a showcase of this approach in the near future, so stick around :-) Have a good day!
Thanks for the video...It definitely help me to get rid from misconceptions that bothering me for last few months which type to use & when ...🙏🏻
Hi Anirban, I love to hear that, thanks! Btw, is there anything else in the Jenkins Pipeline world that still bothers you and you would like to learn more about? I will be grateful if you could share your thoughts on that. Thanks in advance, have a good day!
@@szymonstepniak 1. Related to plugins when,why & how to use or how much necessary.
2. Dependable pipeline with example using tools like packer & terraform or related to similar operation.
Thanks for the reply... maybe I asked too much ; I found video on this topics in this platform but presentation not that much good...so I'm requesting you
@Anirban Sen Thanks a lot for the suggestions, Anirban! 👍 Regarding Jenkins plugins, I was thinking about recording a video with the most useful (in my opinion) plugins worth considering. It's clear that depending on the use case, people will search for different plugins, but there is a subset of generic plugins that everyone can benefit from. Regarding terraform - what specifically have you in mind? There are so many different things terraform can be used for, so I thought I will ask a follow-up question to check if we are on the same page. Thanks in advance, have a good day!
@@szymonstepniak Thanks a lot for considering my suggestion...Incase of Terraform I'm thinking about dynamic cloud infrastructure development perspective...or something like that using some other tools not focused on infra also well enough.
your videos are really awesome...the way you present the content is too good... I am looking for tutorial on "Jenkins Scripted Pipeline with Groovy Script" for beginners but I could not find anything on youtube. It would be great, if you publish a series on Jenkins Scripted Pipeline (using Groovy) for beginners. Thanks in advance !
Thanks for your kind words! I can't promise anything - I haven't used Jenkins for more than a year, and I don't know if I will have enough time to re-invest into producing Jenkins-related content. We will see what the future brings :) Take care, and have a good day!
What a great explanation 👏
Glad you think so!
This was so helpful, thank you so much!
Glad it was helpful! Take care, and have a good day!
Thanks for the great video. Could you explain more about navigating in directories inside workspace using pipeline, launching npm scripts etc.
Mindblowing stuff!! Thank you
Thank you!
BTW, the background music is great, seems like BGMs The Witcher 3? :)
Yeah, it has Witcher vibe, but it's just one of the royalty free music from the HookSounds library - www.hooksounds.com/royalty-free-music/medieval-mandola/1159526/ :-)
Excellent explanation..
Thank you very much for your kind words! Have a good day!
Clear and nice, thanks for sharing!
My pleasure!
Really cool video! Very informative, thank you! I will share it.
Thank you, Iryna! I'm very happy to hear you found it useful! 👍
May I know how to deploy the artifact to dev, qa and stage environment using declarative pipeline
Hi, S BAVAJI! There is no one size fits all, and the question you asked is very broad. I will publish a video that covers full CI/CD pipeline based on Jenkins declarative pipeline syntax in a few weeks, I hope you will find it useful. Have a good day!
@@szymonstepniak it will be very helpful if you do it thank you
Nicely explained bro. I have searched for this for a long time. Thanks for your effort. Please make pipeline with real time scenarios with python scripting.
Thank you for your kind words! I added your suggestion to my backlog. Have a good day!
Best tutorial.. thanks man
Thanks for your kind words! Have a good day!
Awesome explanation..thanks alot
Thanks for your kind words, Gopi! Have a good day!
Really nice content in this video and in the channel! Thank you very much!
Glad you enjoy it!
Excellent explanation. Thankyou!
Thank you for the comment! I'm happy to hear you find it useful.
Hello stranger 😂
Hello! 😉
Very good examples.. Thanks :)
Glad you liked it! Have a good day!
To the point.... kudos for your effort...
Thanks for your kind words! Take care, and have a good day!
First thing I did was look for music you used
There's a link to the music I used in the bottom of the description :) Take care, and have a good day!
Excellent. Thank you.
Thanks for your kind words, Shanmuga! Take care, and have a good day!
your jenkins looks so different
I use Blue Ocean UI plugin for Jenkins v2. It can be installed from the official plugin manager. You can give it a try :) Good luck!
simple. direct to point. Thanks ✌🏼
Thanks, Pradeek! 👍
how could i watch git changes in pipeline job the same way it is very easy doing in freestyle job?
Hi, André! I don't know if this can be done with the pipeline job. If you go to the "Changes" page in the pipeline job, it only displays git commit refs of changes that were made since the previous build, but there is no diff or detailed view. Maybe there is some Jenkins plugin that adds this feature, but I'm not aware of any.
@@szymonstepniak got it!! thank you =) its easy to do, but you need to set correctly branches path in checkout and you can set triggers { pollSCM('* * * * *') } right below agent {}, it must be inside pipeline {} block.. and then you will be able to check git polling log and see what is being pulled from your last checkout...
@@andredrumond379 Wow, this sounds interesting. Thanks for sharing this tip! I definitely need to test it out :)
Excellent video, helps a lot
Thanks, Jack! I'm glad to hear you've found it useful. Is there anything else in this topic you would like to learn about? Have a good day!
Nice content! Thanks a lot sharing it.
Thank you so much for the kind words, Alberto. I hope you find my other videos useful as well. Have a good day!
I want to use a declarative pipeline but without the option to restart the stage appearing on BlueOcean UI. Can it be done?
Hi Kartik! There is no configuration option to disable restart from stage feature in the declarative pipeline. Some users requested adding one some time ago, but it was never resolved - issues.jenkins-ci.org/browse/JENKINS-54250 Check comments in this Jira issue, some people shared alternative ways to deal with it. Maybe you will find one that works for you. Good luck and have a good day!
Well done!
Thanks, Sonnix! I'm glad to hear you liked it ☺️
Thank you for this excellent video tutorial.
Thanks for the kind words, Goutam! I'm happy to hear you find it useful :)
Great video thanks
Glad you enjoyed it! Take care, and have a good day!
Thanks ! its very informative
Glad it was helpful! Have a good day!
great video
Thanks for another comment with the warm words! Take care, and have a good day!
Good one
Thanks, Rajesh! What kind of content would you enjoy to see in the future? Is there anything I could help you with? Thanks in advance!
Thanks!
Welcome!
anyone knows why he stopped making videos?
Thanks.
Thanks for your kind words! I'm happy to hear you enjoyed it. Have a good day!
Thanks a lot! amazing !
Thanks for your kind words, Shai! Have a good day!
came here to see jenkins video, found king arthur himself
Thanks for the comment! I guess this medieval-like music created that vibe :) I hope you liked the video and you've learned something useful from it. Have a good day!
Awesome :)
Thank you, Sathya!
Maska chaska 👍
Why does everyone is like: scripted vs declatative - let me tell you why you why you shoudl use declarative!
What about scripted ? Cool options tricks ?
Did bunch of googling and it seems the answer should be: because noone uses scripted!
It looks like the scripted pipeline is still widely used. I watch the "jenkins-pipeline" tag on StackOverflow, and I see questions with scripted pipelines showing up almost every day. Also, there are still many examples (e.g., on jenkins.io website) that show some pipeline features using scripted pipeline syntax. There is nothing wrong with that, and this video was not made to tell that one is better than another, but just to show a few practical differences instead. I hope you have found something useful in this video. Cheers!
👍👌
Thanks!
Descriptive
Thanks for the comment, Narashimha! Take care, and have a good day!
good stuff! like + subscribe
Thanks! Take care, and have a good day!
Why do you keep calling me stranger
dont know if you realize this,but the commercials are being spliced into critical points totally ruining any transmission of value -- you need to take a ginormous dump into the ads folks mouth once they start explaining the need for this -- we expect to see this crap at either the beginning or end but not in the middle of you making a point - it wrecks our understanding and makes us despise this, which i am sure is ot what you desire in the least.
Thanks a lot for bringing that up. Ads were placed randomly, and you are right - they could affect the flow for people that are watching the video. I managed to move them to the end of the sections, so each example can be consumed without any interruption. Thanks once again, and have a good day!