Last active
October 30, 2015 00:38
-
-
Save zvercodebender/4758dd04429da5b8cb41 to your computer and use it in GitHub Desktop.
A small XL Deploy CLI script to clean up and archive tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.xebialabs.deployit.engine.api.execution.TaskExecutionState as TaskExecutionState | |
taskList = task2.getAllCurrentTasks() | |
for task in taskList: | |
if task.state == TaskExecutionState.EXECUTED : | |
print "Archive : %s %s %s %s" % ( task.id, task.description, task.owner, task.state ) | |
task2.archive( task.id ) | |
elif task.state == TaskExecutionState.FAILED : | |
print "Canceling: %s %s %s %s" % ( task.id, task.description, task.owner, task.state ) | |
task2.cancel( task.id ) | |
else: | |
print "---------: %s %s %s %s" % ( task.id, task.description, task.owner, task.state ) | |
# End if | |
# End for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment