Which line triggers the release in CommitTrigger task bitbucket community plugin


which line triggers the release in CommitTrigger task bitbucket community plugin ?

triggerState = newTriggerState ?

basically i want to make sure, i dont want to trigger release if it is user1.


Hello! If the triggerState output variable is different from the previous run, the trigger will be fired. So if you want to filter out commits by a certain user in BitBucket, you can override the implementation to check the commit user and just don’t update that variable and the trigger won’t fire. HTH!


@vlussenburg- Thanks for the reply, Where can i see the logs or print statements for the triggers when it is executed. it doesnt show any print statements printed in the xlrelease.log file, i want to see all the print statements in the log.


You could enabled debug logging, see here

The specific logger name you could configure is com.xebialabs.xlrelease.actors.triggers, which logs:

  • logger.debug(s"Starting execution of $triggerId")
  • IF the variable has changed: debug(s"Updating trigger with new state and/or variables on trigger : ${releaseTrigger.getId} ${releaseTrigger.getType}")

If you don’t see the second line, that means the triggerState variable was not updated.

Of course you could put print statements in your own python trigger code.


@vlussenburg - I have below prints in my code, but it doesnt print anything there, its just printing the branch and commitId from the internal statechange class. but the logic works.

if commitByUser != “Admin”:
triggerState = newTriggerState
print(“Bitbucket triggered release for %s-%s” % (branch, commitId))
print(“Bitbuket user %s is ignored for activating release trigger. Checking again later.” % (commitByUser))


I’m not sure I quite follow! Are you not seeing any print statements at all?


@vlussenburg – Yeah its not printing any print stmts.