[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'
    }
}

构建,插件结果如下

posted @ 2018-01-26 14:15  _毛台  阅读(5486)  评论(0)    收藏  举报