pipeline step description

 

 

修改前:

    echo ‘Hello World‘

给step添加label:

sh script: " echo ‘Hello World‘", label: "tet it"

添加后多了一个字段: "parameterDescription", 这个字段保存了执行的命令

https://www.e-learn.cn/topic/3024674

https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api#get-jobjob-namewfapiruns

添加label前:

{
"_links": {
"self": {
"href": "/job/te_pipeline/3/execution/node/11/wfapi/describe"
}
},
"id": "11",
"name": "test",
"execNode": "",
"status": "SUCCESS",
"startTimeMillis": 1625238851132,
"durationMillis": 4270,
"pauseDurationMillis": 0,
"stageFlowNodes": [{
"_links": {
"self": {
"href": "/job/te_pipeline/3/execution/node/12/wfapi/describe"
},
"log": {
"href": "/job/te_pipeline/3/execution/node/12/wfapi/log"
},
"console": {
"href": "/job/te_pipeline/3/execution/node/12/log"
}
},
"id": "12",
"name": "Shell Script",
"execNode": "",
"status": "SUCCESS",
"parameterDescription": " echo ‘Hello World‘",
"startTimeMillis": 1625238852265,
"durationMillis": 3060,
"pauseDurationMillis": 0,
"parentNodes": ["11"]
}]
}

添加 label 后

{
"_links": {
"self": {
"href": "/job/te_pipeline/5/execution/node/11/wfapi/describe"
}
},
"id": "11",
"name": "test",
"execNode": "",
"status": "SUCCESS",
"startTimeMillis": 1625240102435,
"durationMillis": 784,
"pauseDurationMillis": 0,
"stageFlowNodes": [{
"_links": {
"self": {
"href": "/job/te_pipeline/5/execution/node/12/wfapi/describe"
},
"log": {
"href": "/job/te_pipeline/5/execution/node/12/wfapi/log"
},
"console": {
"href": "/job/te_pipeline/5/execution/node/12/log"
}
},
"id": "12",
"name": "tet it",
"execNode": "",
"status": "SUCCESS",
"parameterDescription": " echo ‘Hello World‘",
"startTimeMillis": 1625240102561,
"durationMillis": 625,
"pauseDurationMillis": 0,
"parentNodes": ["11"]
}]
}

pipeline step description

上一篇:noi.ac 七一挑战赛


下一篇:MongoDB数组修改器更新数据