相关疑难解决方法(0)

如何在推送掌握时使用Git触发器制作Jenkins CI?

我正在尝试使用GitHub为一个项目设置Jenkins-ci.我已经使用适当的插件设置了Jenkins.我希望Jenkins只在项目中有人推动掌握时运行构建脚本.到目前为止,我已经能够设置它,以便在任何人推送到任何地方时都会触发构建,但这太宽泛了.我在Git上使用post-receive服务挂钩完成了这个.

我已经阅读了Jenkins wiki和一些教程,但缺少这个特殊的细节......它可能与民意调查有关吗?或者应该在Git方面完成工作,这样Git只会在master更改时触发Jenkins ?

git github jenkins

201
推荐指数
4
解决办法
22万
查看次数

Jenkins REST API创建工作

我正在使用REST API在Jenkins中创建一个新工作.我尝试了下面的curl命令行,但是他们抛出了一个错误

curl -i -X POST --user "admin:<API token>" --data-binary "@C:\mylocalconfig.xml" -H "Content-Type: text/xml" http://localhost:8080/createItem?name=NewJob

curl -X POST -u <username>:<pass> -H "Content-Type:application/xml" -d "@C:\mylocalconfig.xml" "http://localhost:8080/createItem?name=AA_TEST_JOB3"
Run Code Online (Sandbox Code Playgroud)

错误:


HTTP/1.1 403 No valid crumb was included in the request
Date: Fri, 01 Jul 2016 05:25:59 GMT
X-Content-Type-Options: nosniff
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 360
Server: Jetty(9.2.z-SNAPSHOT)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 403 No valid crumb was included in the request</title>
</head>
<body><h2>HTTP ERROR 403</h2>
<p>Problem accessing /createItem. Reason:
<pre>    No …
Run Code Online (Sandbox Code Playgroud)

jenkins

41
推荐指数
1
解决办法
4万
查看次数

标签 统计

jenkins ×2

git ×1

github ×1