詹金斯没有拿到正确的Gerrit分支 [英] Jenkins doesn't fetch the correct Gerrit branch

查看:227
本文介绍了詹金斯没有拿到正确的Gerrit分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让詹金斯测试代码进行审查。詹金斯的工作是在推/推/主的基础上开始的,但它试图建立起源/主分支,而不是建立参考/变化/ XX / X / X分支。有人知道我做错了什么?

I want jenkins to test the code for review. The jenkins job is started on a push to refs/for/master but it tries to build the origin/master branch and not the refs/changes/XX/X/X branch. Has somebody an idea what i did wrong?

登录jenkins:

Log from jenkins:

Triggered by Gerrit: http://localhost/13
Building on master in workspace 
/var/lib/jenkins/jobs/CI-JoysteerLogApi/workspace
Checkout:workspace / /var/lib/jenkins/jobs/CI-JoysteerLogApi/workspace - hudson.remoting.LocalChannel@28071488
Using strategy: Default
Last Built Revision: Revision f604c6257923d4231b74573528d0116e0b52dc64 (origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://jenkinsCI@192.168.5.20:29418/JoysteerLogApi.git
Commencing build of Revision f604c6257923d4231b74573528d0116e0b52dc64 (origin/master)
Checking out Revision f604c6257923d4231b74573528d0116e0b52dc64 (origin/master)

Git配置:

Git config:

Repository URL: ssh://user@localhost:29418/Project.git
Refspec: $GERRIT_REFSPEC
Branches to build: $GERRIT_BRANCH

Gerrit触发器配置:

Gerrit Trigger config:

Gerrit Project:
  Type: Plain
  Pattern: Project
  Branches:
    Type: Path
    Pattern: **


推荐答案

抱歉,我没有仔细阅读文档...

Sorry i haven read the documentation carefully enough...

缺少什么在Git配置中:

what was missing in the Git config:

Choosing strategy: Gerrit Trigger

这篇关于詹金斯没有拿到正确的Gerrit分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆