Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:12
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
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}"
self.addLogStdout("Result is SKIPPED")
elif res == FAILURE:
self.addLogError("Error occured: {!r}".format(self.getStepStatusText()), stdio=True)
if some_condition:
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