Package com.piketec.jenkins.plugins.tpt
Class CleanUpTask
- java.lang.Object
-
- com.piketec.jenkins.plugins.tpt.CleanUpTask
-
public class CleanUpTask extends Object
Task to execute after executing a builder. Usually done in a finally block- Author:
- jkuhnert, PikeTec GmbH
-
-
Constructor Summary
Constructors Constructor Description CleanUpTask(Run<?,?> distributingJobRun, CleanUpCallable cleanUpCallable, Launcher launcher)
Creates and enqueues an clean up taks that will be executed when callingcleanUp(Run, TptLogger)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
cleanUp(Run<?,?> distributingJobRun, TptLogger logger)
removes and executes a list of CleanUpTask from the registry
-
-
-
Constructor Detail
-
CleanUpTask
public CleanUpTask(Run<?,?> distributingJobRun, CleanUpCallable cleanUpCallable, Launcher launcher)
Creates and enqueues an clean up taks that will be executed when callingcleanUp(Run, TptLogger)
- Parameters:
distributingJobRun
- abstract build as idcleanUpCallable
- the callable to execute for clean uplauncher
- the launcher
-
-
Method Detail
-
cleanUp
public static boolean cleanUp(Run<?,?> distributingJobRun, TptLogger logger) throws InterruptedException
removes and executes a list of CleanUpTask from the registry- Parameters:
distributingJobRun
- to identify to which registry the task is going to be removedlogger
- for dumping error messages- Returns:
- true if it was possible to execute the tasks.
- Throws:
InterruptedException
- If thread was interrupted
-
-