2017-05-07 326 views
0

我在詹金斯有一个多分支管道项目。我有两个主要分支(主人和生产)正确运行一段时间。但其中一个步骤是构建一个新版本的node码头图像(在一个从属Raspberry pi上),作为生产系统的最终基础。我觉得在自己的分支中隔离这个步骤会更好,这样我们可以控制何时升级版本。如何调试Jenkins多分支扫描 - 不处理新分支

所以我做了一个名为“节点”的分支,并将Jenkinsfile修改为只有在其中构建节点的步骤。我还提高了它要构建的节点版本(到7.10.0)。

多分支索引查找新的分支,但是不会执行任何操作。我如何找出原因?

这里是从扫描/索引运行

Started by timer 
[Sun May 07 21:43:00 BST 2017] Starting branch indexing... 
> git rev-parse --is-inside-work-tree # timeout=10 
Setting origin to [email protected]:dev/pasv5 
> git config remote.origin.url [email protected]:dev/pasv5 # timeout=10 
Fetching origin... 
Fetching upstream changes from origin 
> git --version # timeout=10 
using GIT_ASKPASS to set credentials 
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* 
using GIT_ASKPASS to set credentials 
> git ls-remote [email protected]:dev/pasv5 # timeout=10 
> git rev-parse --is-inside-work-tree # timeout=10 
Setting origin to [email protected]:dev/pasv5 
> git config remote.origin.url [email protected]:dev/pasv5 # timeout=10 
Fetching & pruning origin... 
Fetching upstream changes from origin 
> git --version # timeout=10 
using GIT_ASKPASS to set credentials 
> git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* --prune 
Getting remote branches... 
Seen branch in repository origin/master 
Seen branch in repository origin/node 
Seen branch in repository origin/production 
Seen 3 remote branches 
Checking branch master 
     ‘Jenkinsfile’ found 
Met criteria 
No changes detected: master (still at 8c4fddfa66f26af0089f0e55afcd2ac9e13152ef) 
Checking branch production 
     ‘Jenkinsfile’ found 
Met criteria 
No changes detected: production (still at fa97e2fd76895c958a484b21fb4d4852ad000c9b) 
Checking branch node 
Done. 
[Sun May 07 21:43:01 BST 2017] Finished branch indexing. Indexing took 0.27 sec 
Finished: SUCCESS 

注意输出上masterproduction它指出Jenkinsfile发现,但node事实并非如此。为什么?

回答

1

我的错 - 在git的项目配置中的“高级”选项下,您可以列出要考虑的分支。我已经在那里放了masterproduction而不是node。只要我改变它,它开始处理新的分支。