Mac*_*cki 1 header jenkins jenkins-plugins
有没有一种简单的方法或插件可以在Jenkins页面上为所有用户显示任何自定义消息?我想直接在Jenkins上显示重要的更改或操作,而不是通过电子邮件发送给所有人。我的意思是拥有一个类似于“ Jenkins将要关闭”的可配置面板,该面板可以显示并可以更改颜色。我试图为此找到插件,但一无所获。
好的,我会回答我的假问题,也许以后有人会找它。
有一个用于将代码注入页面页眉和页脚的插件:https : //wiki.jenkins-ci.org/display/JENKINS/Page+Markup+Plugin 它不那么容易找到,因为它应该从创建者的页面下载(链接在说明中)。
没有额外的插件:就我而言,它很简单,因为它足以添加系统消息(管理詹金斯->配置系统->系统消息)。 您可以将CSS添加到Jenkins \ war \ css \ style.css并在系统消息中使用它。我重用了jenkins要关闭时显示的“ shutdown-msg”。
#shutdown-msg {
font-weight: bold;
color: white;
background-color: #ef2929;
text-align: center;
margin-left: 2em;
margin-right: 2em;
margin-bottom: 0.5em;
padding: 0.5em;
-moz-border-radius: 0.5em;
}
#yellow-msg {
font-weight: bold;
color: black;
background-color: #eded78;
text-align: center;
margin-left: 2em;
margin-right: 2em;
margin-bottom: 0.5em;
padding: 0.5em;
-moz-border-radius: 0.5em;
}
#green-msg {
font-weight: bold;
color: white;
background-color: #34ba51;
text-align: center;
margin-left: 2em;
margin-right: 2em;
margin-bottom: 0.5em;
padding: 0.5em;
-moz-border-radius: 0.5em;
}
#blue-msg {
font-weight: bold;
color: white;
background-color: #2d72d8;
text-align: center;
margin-left: 2em;
margin-right: 2em;
margin-bottom: 0.5em;
padding: 0.5em;
-moz-border-radius: 0.5em;
}
#grey-msg {
font-weight: bold;
color: white;
background-color: #6b7777;
text-align: center;
margin-left: 2em;
margin-right: 2em;
margin-bottom: 0.5em;
padding: 0.5em;
-moz-border-radius: 0.5em;
}Run Code Online (Sandbox Code Playgroud)
<div id="shutdown-msg">Red message</div>
<div id="green-msg">Green message</div>
<div id="yellow-msg">Yellow message</div>
<div id="blue-msg">Blue message</div>
<div id="grey-msg">Grey message</div>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2954 次 |
| 最近记录: |