ci 使用体会

1、在git review后,必须前一天commit先merge后,下一个commit 才能merge,不然就会出现merge pending的状态。

 

2、jenkins的gerrit trigger的项目,只能是提交代码的时候才能出发,手动的话就会无效,报错为

   

Started by user mustang
Building in workspace /opt/jenkins-1.569-0/apps/jenkins/jenkins_home/jobs/mustang-auto/workspace
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://jenkins@***.git
FATAL: Failed to fetch from ssh://jenkins@***.git
hudson.plugins.git.GitException: Failed to fetch from ssh://jenkins@***.git
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
	at hudson.model.Run.execute(Run.java:1732)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:234)
Caused by: hudson.plugins.git.GitException: Command "fetch -t ssh://[email protected]:29418/mustang-web.git $GERRIT_REFSPEC" returned status code 128:
stdout: 
stderr: fatal: Couldn't find remote ref $GERRIT_REFSPEC

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.fetch(CliGitAPIImpl.java:187)
	at hudson.plugins.git.GitAPI.fetch(GitAPI.java:229)
	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:610)
	... 10 more

  

 

 

参考资料:

http://openwares.net/linux/git_gerrit_gradle_jenkins_integration.html

你可能感兴趣的:(ci 使用体会)