In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
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!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.