jenkins的Timestamper插件-让jenkins console带时间戳
-
配置pipline,使用timestamp
- 官网有说怎么用: 即用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'
}
}
构建,插件结果如下