Jenkins Pipeline - 具有时间和输入的阶段

gdz*_*orp 5 jenkins jenkins-pipeline

我创建了一个管道,其中有一个阶段仅在开发分支上执行。该阶段还需要用户输入。即使我在不​​同的分支上,为什么它会卡在这些步骤的用户输入上?当我提供输入时,它们会被正确跳过。

\n\n
stage(\'Deploy to UAT\') {\n    when {\n        branch \'develop\'\n        beforeAgent true\n    }\n    options {\n        timeout(time: 5, unit: \'MINUTES\') \n    }\n    input {\n        message "Deploy to UAT?"\n        ok "Yes"\n    }\n\n    steps { echo "deploing!" }\n\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

BlueOceas 的 Jenkins 版本为 1.7.0 \xc2\xb7 Core 2.121.1 \xc2\xb7 d7cda7a \xc2\xb7 2018 年 7 月 13 日 06:49

\n

小智 2

这是Jenkins 管道中的一个错误。input步骤在条件之前评估when