How to display the time it took to run a build in Jenkins?

前端 未结 5 1657
难免孤独
难免孤独 2021-01-12 03:14

I\'m configuring a process of Android application build by using Jenkins pipeline.

At the beginning and the end of the build, a message is sent to a relevant Slack c

5条回答
  •  梦谈多话
    2021-01-12 04:00

    Above @Evan's answers works perfectly fine to me to find out/show the build time duration of the Jenkins job.

    echo ${currentBuild.durationString.replace(' and counting', '')}

提交回复
热议问题