2017-01-11 51 views
3

Jenkins 2.32.1,所有插件今天更新到最新版本。我有一些老版本的插件,所以我不認爲這只是一個最近的插件錯誤。爲什麼詹金斯在推送到Github時不會構建我的項目?

當我在Jenkins UI中詢問它時,我的項目沒有問題。當我將它配置爲輪詢時,它也可以正常工作。但是,我無法通過推送Github來啓動它。

在我的項目的配置,

enter image description here

在Github上的一面,我有

enter image description here

網絡掛接交付是成功的,即返回HTTP狀態200

https://jenkins.myorg.com/job/api/GitHubPollLog/我看到

Last GitHub Push 
Started on Jan 11, 2017 10:33:41 PM 
Using strategy: Default 
[poll] Last Built Revision: Revision ee4b3fe5b57ecd5ae5875bce573b32bb60074dfa (refs/remotes/origin/master) 
using GIT_SSH to set credentials 
> git ls-remote -h [email protected]:myorg/myrepo.git # timeout=10 
Found 2 remote heads on [email protected]:myorg/myrepo.git 
Using strategy: Default 
[poll] Last Built Revision: Revision ee4b3fe5b57ecd5ae5875bce573b32bb60074dfa (refs/remotes/origin/master) 
using GIT_SSH to set credentials 
> git ls-remote -h [email protected]:myorg/myrepo.git # timeout=10 
Found 2 remote heads on [email protected]:myorg/myrepo.git 
Done. Took 2 sec 
No changes 

「最後建成修訂」 行做的確說出最近修建的修訂(手動)的SHA。但是有一些變化,因爲我只是爲了測試而推出了一個虛假更新。

在詹金斯的主要日誌我看到

Jan 11, 2017 10:33:41 PM INFO 
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent 
Received POST for https://github.com/myorg/myrepo 
Jan 11, 2017 10:33:41 PM INFO 
org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber$1 run 
Poked api 

,僅此而已。

我知道類似的問題已經被問了很多次。我已經檢查了所有提到的注意事項在

沒有成功,並看了很多別人而任何其他的洞察力。有什麼建議麼?

回答

0

我們最終通過切換到Jenkins功能掃描一個人的Github組織並自動爲每個具有Jenkins文件的回購創建工作,從而繞開了這個問題。如此創建的Repos在推送到時會自動生成。

-1

我們正在使用Jenkins版本1.570-CIaaS,它具有以下選項,可爲每個PR(來自任何用戶的PR)構建觸發器。

構建觸發器這有一個選項GitHub合併請求構建器。

不知道我是否回答你的問題,以防萬一這些信息有幫助。