Jenkins Pipeline For Multiple Java Versions Using Matrix Feature

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 56

  • @szymonstepniak
    @szymonstepniak  4 года назад +5

    ⏱️ Timestamps:
    00:00 | Intro
    01:07 | Explaining the previous Dockerfile
    02:03 | Creating Dockerfile for SDKMAN!
    02:48 | Explaining how Jenkins runs the container
    03:42 | Creating jenkins user
    04:30 | Installing SDKMAN
    05:16 | Installing Java and Maven using SDKMAN
    07:19 | Preparing PATH env variable
    09:04 | Building the docker image
    09:48 | Running container from the created image
    10:19 | Creating Jenkinsfile
    10:51 | Defining matrix with different Java versions
    12:03 | Defining Build and Test stages
    12:30 | Defining dockerfile agent
    15:34 | Running the pipeline
    19:13 | End screen

    • @IsmailAlabou
      @IsmailAlabou 3 года назад

      can I run Jenkins pipeline which execute dockerfile (who create docker image), inside my jenkins docker image. (in other words docker inside docker) #dind

    • @IsmailAlabou
      @IsmailAlabou 3 года назад

      I tried it it said: docker not found

    • @szymonstepniak
      @szymonstepniak  3 года назад

      @@IsmailAlabou You need to make sure that the user that is used to run the Jenkins server has an access to the docker client. On Linux, it's usually a matter of adding a user to the docker group. It should be similar on Windows if this is your case. Regarding docker in docker - it is doable. This article (jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/) explains how to do it. Good luck!

  • @GaurankGoyal
    @GaurankGoyal 4 года назад +6

    Wow, Really these are the best Jenkins tutorial videos you can find on youtube. Really appreciated!!

    • @szymonstepniak
      @szymonstepniak  4 года назад

      Thank you so much for your kind words, Gaurank! I'm glad to hear you appreciate watching my videos. Let me know if there is any topic that interests you the most. Thanks in advance, and have a good day!

  • @arishnapalli
    @arishnapalli 3 года назад +3

    Its Really Awesome , your way of explanation is very good .. appreciating sharing your knowledge.
    Thanks a lot.

    • @szymonstepniak
      @szymonstepniak  3 года назад +1

      Thank you for your kind words, Sridhar! I'm glad to hear you find this video helpful. Take care, and have a good day!

  • @toddcostella953
    @toddcostella953 4 года назад +2

    Let me add my thanks to the list! Great explanation.

    • @szymonstepniak
      @szymonstepniak  4 года назад

      Thank you, Todd! You're very kind. I'm glad to hear you find this video useful. 🙂

  • @ivmilicevic
    @ivmilicevic 3 года назад +1

    I just stumbled upon this Jenkins series and it's great. Hope you will soon return to making videos, keep up good work

    • @szymonstepniak
      @szymonstepniak  3 года назад +1

      Thanks a lot for your kind words, Ivan! Stay tuned :) Take care, and have a good day!

  • @bhargav933
    @bhargav933 4 года назад +1

    really smooth and good explanation.

    • @szymonstepniak
      @szymonstepniak  4 года назад

      Thank you, Bhargav! I'm glad to hear you liked it. Have a good day!

  • @ramlakshmi213
    @ramlakshmi213 4 года назад +2

    Awesome video Szymon really loving your explanation keep up your thoughts

    • @szymonstepniak
      @szymonstepniak  4 года назад +1

      Thanks, Ramarao! I'm glad to hear you like it 👍

  • @viveknidhi
    @viveknidhi 4 года назад +1

    AWESOME session!!

  • @kashyapkiran1729
    @kashyapkiran1729 4 года назад +2

    Excellent video. Publishing the java artifact to jfrog or to nexus repository would have made this super excellent one.😀

    • @szymonstepniak
      @szymonstepniak  4 года назад

      Thanks for the comment, Kashyap! I will be working on a video that explain the full CI/CD pipeline for a Java project (Maven or/and Gradle), including publishing artifacts stage. Stay tuned and have a good day! :)

  • @HG47669
    @HG47669 4 года назад +2

    Excellent tutorial. Keep it up.👍

    • @szymonstepniak
      @szymonstepniak  4 года назад +1

      Thanks, Haseeb! I'm glad to hear you liked it 👍

  • @SebastianPlagge
    @SebastianPlagge 4 года назад +1

    Great tutorial as always.

  • @lorenzobragagnolo1930
    @lorenzobragagnolo1930 2 года назад +1

    thanks for the excelent technicall content, keep it going !

    • @szymonstepniak
      @szymonstepniak  2 года назад +1

      Thanks for your kind words, Lorenzo! Take care, and have a good day!

  • @Mohan-nf6cu
    @Mohan-nf6cu 3 года назад +1

    Awesome videos and nice explanations. Thanks a lot.

    • @szymonstepniak
      @szymonstepniak  3 года назад +1

      Thank you for your kind words, Mohan! Have a good day!

    • @Mohan-nf6cu
      @Mohan-nf6cu 3 года назад

      @@szymonstepniak Thanks Szymon. Have a good day.

  • @sammok2477
    @sammok2477 2 года назад +1

    These are very informative materials and you are excellent presenter/teacher. Are you on StackOverflow, could we post more detailed question there for you?

    • @szymonstepniak
      @szymonstepniak  2 года назад

      Thanks for your kind words! I do answer some questions on Stack Overflow, but I don't have time to answer any of them and I won't do it on request. I prefer to create videos/blog posts - it scales much better :) Take care, and have a good day!

  • @daherdaher2560
    @daherdaher2560 2 года назад +1

    Great channel and person

    • @szymonstepniak
      @szymonstepniak  2 года назад

      Thanks for your kind words, Daher! Take care, and have a good day!

  • @PriyaJ234
    @PriyaJ234 6 месяцев назад

    Thanks a lot bringing this tutorial, could you please bring detailed tutorial on groovy scripting for jenkinsfile creation

  • @sanketjaiswal1137
    @sanketjaiswal1137 4 года назад +1

    Excellent szymon please make video on shared library to much complex pipelines to example or best practices

    • @szymonstepniak
      @szymonstepniak  4 года назад +1

      Thanks for the kind words, Sanket! Both full CICD pipeline example and Jenkins Shared Libraries are on my backlog. Stay tuned and have a good day! :)

  • @rajindergandhi3437
    @rajindergandhi3437 4 года назад +1

    Excellent video

    • @szymonstepniak
      @szymonstepniak  4 года назад

      Thanks, Rajinder! I'm glad to hear you liked it 👍

  • @lakshmibalanagu7371
    @lakshmibalanagu7371 4 года назад +2

    Really thanks alot. I am new to devops , i am searching for best videos , i don't know how to learn jenkins but after finding ur videos , i am very happy and i learned something new in easy way. Thanks alot please post more videos related to devops tool ........... I am expecting more videos . Really awesome 👌👌👌👌 explanation. U have unique style. Every one can understand easily. if u don't mine can i ask u one question which code editor are u using? to edit jenkins file and docker file. plz tell us easy devops env setup.

    • @szymonstepniak
      @szymonstepniak  4 года назад

      Thanks, lakshmi! I will publish more Jenkins related videos soon, including a few for less experienced Jenkins users. Regarding the editor, I use IntelliJ IDEA. It's my favorite IDE for writing Java/Groovy code, and I also use it for Jenkinsfiles.

    • @lakshmibalanagu7371
      @lakshmibalanagu7371 4 года назад

      @@szymonstepniak thanks for your reply and plz post some videos on how to prepare for interviews as a devops engineer . Which is the better way to learn these many tools? Plz do some videos on these type of topics

  • @Oswee
    @Oswee 3 года назад +2

    I really would like to see combination of Jenkins, Terraform, Ansible and some Build tool. Let's say i have an repo with Terraform resources to spin up the entire cluster, then i want to run Ansible to configure my VM's and install a software and when it's done i want to test, build and deploy the containers into my cluster. How would look like such repository and how these pipelines could be chained together. And ideally, if the Terraform or Ansible has no changes, then these pipelines are not triggered.

    • @szymonstepniak
      @szymonstepniak  3 года назад +1

      Thanks for sharing your idea, Dzintars! I'm thinking about explaining a few use cases for Terraform in Jenkins, I will take your comment into account when preparing the content. Have a good day!

  • @Sairam-ym7oh
    @Sairam-ym7oh 4 года назад +1

    Thanks, great video indeed! Just curious which Linux distro do you use?

    • @szymonstepniak
      @szymonstepniak  4 года назад +2

      Hi, Sairam! Thanks for the kind words, I appreciate that! Regarding my Linux distro - I use Fedora Linux with the XFCE desktop environment. For the terminal emulator, I use Guake (guake-project.org) so I can bring the terminal window with a hot key (F12 in my case) whenever I need to use it. For the shell environment, I use ZSH powered by oh-my-zsh (github.com/ohmyzsh/ohmyzsh). And that's it :) I hope you will find this useful and it may inspire you to check some of the tools I mentioned earlier. Thanks for the comment, have a nice day!

    • @Sairam-ym7oh
      @Sairam-ym7oh 4 года назад +1

      @@szymonstepniak thanks so much for sharing details. It's a pleasure to watch you code, keep it up \m/

    • @szymonstepniak
      @szymonstepniak  4 года назад +1

      @@Sairam-ym7oh I will, definitely! Thx! 🤘😆🤘

  • @KrzysztofSzortyka
    @KrzysztofSzortyka Год назад +1

    How could docker buildx (for building multi architecture) be used in this way?

    • @szymonstepniak
      @szymonstepniak  Год назад

      I don't know, never used buildx myself. Take care, and have a good day!

  • @kimferko9038
    @kimferko9038 3 года назад +1

    Hi, how would you create an Automated CI/CD Pipeline in Jenkins with Java 14
    or later using Selenium Webdriver in a Maven Project with TestNG?
    Am Not interested on how to setup Jenkins with Java 8 or 11!

    • @szymonstepniak
      @szymonstepniak  3 года назад

      Thank you for your comment. Have a good day!

  • @deviabhishek7783
    @deviabhishek7783 2 года назад +1

    Hi sir I have issue i don't not how to recive you
    In my Jenkins master have two slaves one is ec2-linux and other one is ec2-windows .But the Java paths are different How do we provide different Java paths for different agents in Jenkins pipeline

    • @szymonstepniak
      @szymonstepniak  2 года назад

      I think you should be able to solve it by using withEnv() on those agents, as explained here - stackoverflow.com/a/47896135/2194470 Good luck, and have a good day!

  • @benaam5441
    @benaam5441 2 года назад +1

    How can we use different java versions in scripted pipeline?

    • @szymonstepniak
      @szymonstepniak  2 года назад

      I don't have any out of the box answer to this question. I think it is possible to implement something similar (not necessarily 1:1) as the solution shown in the video with the scripted pipeline. Good luck, and have a good day!

  • @user-gy8xn4kt7s
    @user-gy8xn4kt7s Месяц назад

    Multi jobs, because we dont know about matrix
    Thanks