expression
Execute the stage when the specified Groovy expression evaluates to true, for example: when { expression { return params.DEBUG_BUILD } }
Note that when returning strings from your expressions they must be converted to booleans or return null to evaluate to false.
Simply returning "0" or "false" will still evaluate to "true".
1条答案
按热度按时间6za6bjd01#
摘自Jenkins文档:
因此,如果您插入一个有效的groovy语句,它应该可以工作。
或者,您可以使用
allOf
语句,例如: