Jenkins Pipeline For Multiple Java Versions Using Matrix Feature

Опубликовано: 11 Март 2025
на канале: Szymon Stepniak
8,840
238

Learn how to set up Jenkins Pipeline matrix with multiple Java versions ■ Jenkins Pipeline Tutorial ■ Jenkins Pipeline as Code ■ #jenkinspipeline

In this tutorial, I show you how to set up Jenkins Pipeline matrix with multiple Java versions using Docker containers.

💾 GET THE SOURCE CODE:
• https://github.com/wololock/jenkine-p...
• git clone --single-branch --branch sdkman https://github.com/wololock/jenkins-p...

⏱️ 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 a 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

➡️ MENTIONED IN THE VIDEO:
------------------------------------------------------------
• SDKMAN! website » https://sdkman.io
• Jenkins Pipeline Matrix feature explained » https://www.jenkins.io/blog/2019/11/2...
• Dockerfile Reference Manual » https://docs.docker.com/engine/refere...

📺 WATCH NEXT:
Jenkins Pipeline Environment Variables Explained »    • Jenkins Pipeline Environment Variable...  

☕️ BUY ME A COFFEE (thanks in advance! 😀)
https://e.printstacktrace.blog/buy-me...

📧 JOIN MY NEWSLETTER
https://e.printstacktrace.blog/newsle...

🔥 MORE JENKINS PIPELINE TUTORIAL VIDEOS & RESOURCES:
------------------------------------------------------------
• Jenkins Declarative Pipeline vs. Scripted Pipeline »    • Jenkins Pipeline Tutorial: Declarativ...  
• Declarative vs. Scripted Q&A »    • Declarative Jenkins Pipeline OR Scrip...  
• Jenkins Pipeline Environment Variables »    • Jenkins Pipeline Environment Variable...  
• Jenkins Pipeline for Maven projects »    • Jenkins Pipeline for Java using Maven...  
• 5 Common Jenkins Pipeline Mistakes »    • Avoid These 5 Jenkins Pipeline Mistak...  
• Jenkins Pipeline Learning Kit » https://kit.co/wololock/jenkins-pipel...
• Jenkins Pipeline Cookbook blog posts series » https://e.printstacktrace.blog/jenkin...

📷 CAMERA GEAR I USE:
------------------------------------------------------------
• My camera » https://e.printstacktrace.blog/gear/c...
• 25mm f1.7 lens » https://e.printstacktrace.blog/gear/l...
• Microphone » https://e.printstacktrace.blog/gear/m...
• LED lights » https://e.printstacktrace.blog/gear/l...
• Check my full kit » https://kit.co/wololock/my-youtube-st...

🛠️ TOOLS & SERVICES I USE TO:
------------------------------------------------------------
• design YouTube thumbnails (Canva) » https://e.printstacktrace.blog/canva?...
• improve my grammar skills (Grammarly) » https://e.printstacktrace.blog/gramma...
• develop mailing list (ConvertKit) » https://e.printstacktrace.blog/conver...
• listen to audiobooks (Audible, 30 days free trial) » https://e.printstacktrace.blog/audibl...
• read Kindle ebooks (Kindle Unlimited) » https://e.printstacktrace.blog/kindle...
• secure network connection with VPN (NordVPN) » https://e.printstacktrace.blog/nordvp...
• improve SEO on YouTube (VidIQ) » https://e.printstacktrace.blog/vidiq?...
• host WordPress websites (Bluehost) » https://e.printstacktrace.blog/blueho...

❤️ SUPPORT MY WORK
------------------------------------------------------------
• Github Sponsors » https://github.com/sponsors/wololock
• Open Collective » https://opencollective.com/eprintstac...
• Other options » https://e.printstacktrace.blog/suppor...

👋 STAY IN TOUCH:
------------------------------------------------------------
• Blog » https://e.printstacktrace.blog
• Twitter »   / wololock  
• LinkedIn »   / szymon-st%c4%99pniak-9a0b1630  
• Github » https://github.com/wololock

✉️ CONTACT:
For all subscribers, please use this email: [email protected]
For business inquires only, please use this email: [email protected]

DISCLAIMER: Some of the links above are affiliate links. If you decide to click that link and subsequently make a purchase, I will get a small percentage from your purchase. Using the affiliate link does not affect the final price of the product. The commission I earn comes at no additional cost to you. Thank you for supporting my channel so I can continue to provide you with free content on a regular basis!

And remember - it's all about helping YOU to become a better software developer! Thanks!

#eprintstacktrace #szymonstepniak