0
我有兩個作業叫做ParentJob
和ChildJob
。 ParentJob
觸發下游作業ChildJob
。即使傳遞true,Jenkins DSL booleanCondition()也不會返回true
從ParentJob
我傳遞的變量作爲
parameters {
predefinedProp('RELEASE','true')
}
在ChildJob
我正在採摘參數作爲
conditionalSteps {
condition {
booleanCondition("RELEASE")
steps {
shell("echo 'Wow !!! condition is parsed as true'")
}
}
在ChildJob
的參數頁面上,我可以看到它正確地來作爲true
:
仍然行shell("echo 'Wow !!! condition is parsed as true'")
未執行。在日誌中,我可以看到:
09:35:41 Run condition [Boolean condition] enabling prebuild for step [BuilderChain]
09:35:41 [Boolean condition] checking [RELEASE] against [^(1|y|yes|t|true|on|run)$] (origin token: RELEASE)
09:35:41 Run condition [Boolean condition] preventing perform for step [BuilderChain]
09:35:41 Finished: SUCCESS
我甚至嘗試通過爲false
從ParentJob
的工作,仍然是同樣的結果。我究竟做錯了什麼?