[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