欢迎光临散文网 会员登陆 & 注册

coderwhy-WEB前端系统课2022

2022-12-25 20:24 作者:芢依稀久忆0  | 我要投稿

定义在 stage 中
Option 除了写在 Pipeline 顶层,还可以写在 stage 中,但是写在 stage 中的 option 仅支持 retry、 timeout、timestamps,或者是和 stage 相关的声明式选项,比如 skipDefaultCheckout。处于 stage 级别的 options 写法如下

pipeline {  agent any  stages {    stage('env1') {      options {   //定义在这里这对这个stage生效        timeout(time: 2, unit: 'SECONDS') //超时时间2秒        timestamps()                     //所有输出每行都会打印时间戳        retry(3)    //流水线失败后重试次数



 


coderwhy-WEB前端系统课2022的评论 (共 条)

分享到微博请遵守国家法律