jenkins-pipeline

9 posts

Jenkins Declarative Pipeline with the dynamic agent - how to configure it?

In some cases, you would like to use Jenkins declarative pipeline with the dynamic agent. For instance, you want to provide a list of available agent nodes as a parameter for the pipeline job. In this blog post, I will explain how you can configure such a behavior in just a few steps.

5 Common Jenkins Pipeline Mistakes

Do you know that you can unit test your Jenkins pipeline code? Have you ever used linter to validate the syntax of the Jenkinsfile? Do you use input step with a long timeout that blocks the executor and you don’t know how to improve? I answer those three questions (and two more) in the following YouTube video.

How to catch curl response in Jenkins Pipeline?

In this blog post, I explain why you may want to use curl command in your Jenkinsfile, how to catch curl response and store it in a variable, as well as how to read HTTP response status code and extract some data from the JSON document. Enjoy!

How to time out Jenkins Pipeline stage and keep the pipeline running?

The declarative Jenkins Pipeline allows us to define timeout either at the pipeline level or the specific stage. This feature prevents Jenkins’s job from getting stuck. However, in some cases, we want to accept that one stage may timeout, but we want to keep the remaining stages running.

Jenkins Scripted Pipeline vs. Declarative Pipeline - the 4 practical differences

If you read this blog post, there is a high chance you’re looking for information about practical differences between scripted and declarative pipeline, correct? You couldn’t find a better place then. I’m going to show you the four most practical differences between those two. Stay with me for a few minutes and enjoy the ride!

Using Jenkins Pipeline parallel stages to build Maven project with different JDKs

In one of the latest blog posts, I have shown you how you can build a Docker image with Java and Maven installed with the SDKMAN! command-line tool. Today I would like to continue the topic and show you, how you can compile your project using two different Java versions in parallel.

Building Java and Maven docker images using parallelized Jenkins Pipeline and SDKMAN!

In the last article, I have shown you how you can build a docker image for Jenkins Pipeline using SDKMAN! command-line tool. Today I will show you how you can build multiple different docker images using parallelized Jenkins Pipeline.

Using SDKMAN! as a docker image for Jenkins Pipeline - a step by step guide

A few days ago, I was struggling with some Docker images I use in my Jenkins CI environment. I run some Jenkins Pipelines, and I like to define build environment as code using custom Docker images. Everything was fine until I had to consider running different Java or Maven versions. I decided to use one of my favorite command-line tools - SDKMAN!, to build a highly configurable build environment.

Jenkins Pipeline Environment Variables - The Definitive Guide

Have you run into troubles when you started using Jenkins Environment Variables in your Jenkinsfile? In this blog post, I show you how to use environment variables, how to override them, how to work with boolean values, and how to store a result of sh step in the env variable. After reading this article, Jenkins env variables won’t surprise you anymore!