如何自定义Jenkins构建名称? [英] How to customize Jenkins build name?

查看:693
本文介绍了如何自定义Jenkins构建名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在詹金斯(Jenkins)工作时,每个构建都被赋予一个名称,该名称在构建历史中的UI中显示,基本上是当前日期和时间.

When I run a job in Jenkins, each build is given a name that shows in the UI in Build History that's basically the current date and time.

我希望能够在其中放置构建参数,以便在构建历史记录中可以看到已构建了哪些分支以及何时构建.

I'd like to be able to put in build parameters there so that I can see in the build history which branches have been built and when.

我已经搜索了插件来执行此操作,但是我找不到任何插件.有一个吗?

I've searched around for plugins to do this, but I haven't been able to find any. Is there one?

推荐答案

类似于构建名称设置器插件.

但是,如果您使用的是管道,则可以执行以下操作:

But if you're using Pipeline, you can do something like this:

currentBuild.description = "#${BUILD_NUMBER}, branch ${BRANCH}"

这篇关于如何自定义Jenkins构建名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆