Jenkins构建监视器墙而无需手动登录

pal*_*int 12 jenkins

我正在尝试使用Raspberry Pi为我们的办公室墙创建一个完全自动化的Jenkins状态屏幕.我能够配置Pi以在电视上显示具有特定URL的浏览器,以及使用我们的构建作业在Jenkins中配置Build Monitor插件.

我们的Jenkins使用基于矩阵的安全性,因此我创建了raspberry具有所需权限的单独用户.(手动登录后,墙上插件显示正确.)

我可以使用以下命令查看有效的HTTP答案:

curl "http://raspberry:0b45...06@localhost:8080/view/wall1/"
Run Code Online (Sandbox Code Playgroud)

0b45...06raspberryJenkins用户的API令牌.(来自 http://localhost:8080/user/raspberry/configure)

不幸的是,这种URL方案在图形浏览器中不起作用.我也尝试了令牌参数但没有成功:

$ curl "http://localhost:8080/view/wall1/?token=0b45...06"
<html><head>...</head><body ...>


Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:

Permission you need to have (but didn't): hudson.model.Hudson.Read
 ... which is implied by: hudson.security.Permission.GenericRead
 ... which is implied by: hudson.model.Hudson.Administer
-->

</body></html>                               
Run Code Online (Sandbox Code Playgroud)

如何在浏览器(如Chromium或Midori)中获取无法登录的URL,并显示我的Jenkins视图?

我不想要任何手动步骤,包括登录(例如VNC),因为它不能很好地扩展到多个办公室/ Pis.

S.S*_*ker 0

您尝试过使用 apiToken 吗?

wget --auth-no-challenge --http-user=user --http-password=apiToken --secure-protocol=TLSv1 http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN
Run Code Online (Sandbox Code Playgroud)

API 令牌可在您的个人配置页面中找到。在每个页面的右上角单击您的姓名,然后单击“配置”以查看您的 API 令牌。

它适用于我的设置:

http://<URL>/view/BuildMonito/?token=<token>
Run Code Online (Sandbox Code Playgroud)