Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to display build information in custom Build History

Shulou Source: shulou.com Published: 2022-05-31 16:46:42 10月04日 Update

This article mainly introduces how to display the construction information in the custom Build History, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

How do you display the current build users and built git branches in the Build History of jenkins? How to customize the information needed for display as shown in the figure below? It's an emoji)

To show the above effect, we need to implement it through two plug-ins and we need to install it in the plug-in management. They are description setter plugin and user build vars.

The function of description setter plugin is to add a function block below the Build column to fill in the custom information, that is, the text that needs to be displayed in the Build history.

User build vars is used to collect information about the current executor.

But to get branch information, we also need a git parameter plug-in, so we need to install

Look at the effect picture in practice:

Install the above two plug-ins, or you can import them and install them after downloading.

Create a new freestyle project dynamic_jenkinsslave_template

If you are building a dynamic slave based on K8s, please select the tag selector, where we need to configure a git parameter configuration named branch, and note that the parameter type is also Branch, which is important. It is also the name of the variable that we need to reference later.

Select Setjenkins user build variables in Build environment

Configure the git repository and branch variable names

Fill in the corresponding information in the setbuild description under Build

This build is initiated by $BUILD_USER $branch build

Construction

Then select the branch you want to build

Viewing the results of the build will have the display information we set up earlier, and you can write your own style here.

View the status of build history

Thank you for reading this article carefully. I hope the article "how to display build Information in Custom Build History" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Information branches plug-ins articles selection configuration two parameters variables effects important that is warehouse value role interest function dynamic at the same time name Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft Docker OPPO Reno NVidia