Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skipping steps in Jenkins job

When you have a long running job in Jenkins which is composed of many steps, and you are actively developing / debugging this job you need to be able to disable some of the steps to skip to a certain step which is been debugged.

How do you do that ?

Obviously you can try to delete the steps not interested in, but that is a pain because restoring these steps is error prone. Same goes for editing them to make them skip by giving them some parameter like -DskipTests.

Another alternative would be to copy the job, but then it's a pain again, because checkout for our relevantly large project takes ages. We can manually copy workspace but that is hard work as well.

What better solutions are there to this problem ?

like image 323
Alex Shnayder Avatar asked Nov 29 '11 12:11

Alex Shnayder


People also ask

How do I skip a build in Jenkins?

use the "Set the build result" step to set the status to "Aborted", this will finish the Jenkins build and will hide the build from the Jenkins dashboard.

What is build step in Jenkins?

This build step enables your Jenkins job to run a Command Workflows in Commander. For the build step to run a command workflow, you must configure the following: Target Type: The types of target that you want to run the command workflow on.

How many ways can you schedule jobs in Jenkins?

Here are the ways in which you can schedule a build job in jenkins: Builds can be triggered by source code management commits. Builds can be triggered sequentially after completion of other builds. Can be scheduled to run at a specified time using the CRON jobs.


1 Answers

Try the Conditional BuildStep Plugin, which requires the Run Condition Plugin With these two plugins, you can conditionalize any build step and skip anyone that you like.

like image 160
Jason Swager Avatar answered Sep 21 '22 13:09

Jason Swager