Matches builds that class for cause is equal to given string.
Allow to match several builds at once based on build cause.
Most popular class names:
UserIdCause - when user
starts the build
TimerTriggerCause
- for time triggers
To check class name of the cause, use following code for debug:
stage("Print causes") {
for (String cause in currentBuild.getBuildCauses()) {
print cause._class
}
}
It validates every cause of the build
and expects that at least one of cause
matches.
Does not support regular expressions but uses contains()
to compare class name.