[ci] jenkins的Timestamper插件-让日志显示时间


jenkins的Timestamper插件-让jenkins console带时间戳

- 官网有说怎么用: 即用timestamps{} 包裹所有的pipscript即可.
Since Timestamper 1.8
Use the timestamps step to wrap the rest of the pipeline script.
timestamps {
    // some block
}

- 实例
timestamps {
    // some block
    stage 'prepare'
    node{sh "mvn -v" }
    node{
        git "https://github.com/lannyMa/java-helloword.git"
        state: 'clean'
        sh 'mvn clean'
        stage 'package'
        sh 'mvn package'
        stage 'test'
        sh 'java -jar target/testweb-v1.0.jar'
    }
}

构建,插件结果如下


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM