Last active
August 29, 2015 14:12
-
-
Save gsemet/f99a1215c66cad650557 to your computer and use it in GitHub Desktop.
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
class TriggerSample(SimpleTriggerStep): | |
descriptionSkipped = "nothing configured" | |
def addRuntimeSchedulerNames(self): | |
a_list = ... | |
autoemr = ['triggerable-{}-mergerequest'.format(a) for a in a_list] | |
return autoemr | |
def postExecute(self, res): | |
if res == SKIPPED: | |
branch_name = self.getProperty("branch_name") | |
self.addLogStdout("No setting in configuration of branch {!r}" | |
.format(branch_name)) | |
self.addLogStdout("Result is SKIPPED") | |
elif res == FAILURE: | |
self.addLogError("Error occured: {!r}".format(self.getStepStatusText()), stdio=True) | |
if some_condition: | |
res = WARNING | |
elif res == SUCCESS: | |
self.addLogStdout("Builds succesfully triggered") | |
return res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment