jenkinsfile

3 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.

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.