捕获Jenkins Pipeline的Shell脚本输出

捕获Jenkins Pipeline的Shell脚本输出,第1张

捕获Jenkins Pipeline的Shell脚本输出

这个完整的管道对您有用吗?使用管道插件2.4为我工作。

pipeline {  agent { label 'docker' }  stages {    stage("test_capture_output_and_print") {      steps {        script {          def commitSha = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()          println("commitSha: ${commitSha}")        }      }    }  }}


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/4898411.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-12
下一篇2022-11-12

发表评论

登录后才能评论

评论列表(0条)

    保存