Trouble using pre-build branch merging

356 views
Skip to first unread message

ngsbioin...@gmail.com

unread,
Feb 22, 2016, 12:07:00 AM2/22/16
to Jenkins Users
Hi all - I just downloaded Jenkins-ci v1.647 and have it set up to build a git repo and have the status displayed in the repo.  I have multiple branches in my repo, some compile, some don't.  I want to have the build status of each branch displayed when viewing a particular branch.  I thought that's what the 'Pre-build Branch Merging' was for, but I'm not sure.   The docs don't match up exactly to what the interface in Jenkins looks like, and when I apply the configuration changes I think are correct, all building of the project fails.  I get the error below.  

Is what I want to accomplish possible and is 'Pre-build Branch Merging' what I'm looking for?  I'm not convinced it is, but based on the description in the docs, I'm not sure.


Started by user anonymous
Building in workspace /home/golharr/.jenkins/workspace/HelloWorldJava
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url http://biogit.pri.bms.com/golharr/HelloWorldJava.git # timeout=10
Fetching upstream changes from http://biogit.pri.bms.com/golharr/HelloWorldJava.git
 > git --version # timeout=10
using .gitcredentials to set credentials
 > git config --local credential.username golharr # timeout=10
 > git config --local credential.helper store --file=/tmp/git6621926992083890087.credentials # timeout=10
Setting http proxy: proxy-server.bms.com:8080
 > git -c core.askpass=true fetch --tags --progress http://biogit.pri.bms.com/golharr/HelloWorldJava.git +refs/heads/*:refs/remotes/origin/*
 > git config --local --remove-section credential # timeout=10
Seen branch in repository origin/BrokenBuild
Seen branch in repository origin/differentIcons
Seen branch in repository origin/master
Seen 3 remote branches
Merging Revision 2eed59be0633b1eca7280cdab401248a14e26351 (refs/remotes/origin/master) to /master, UserMergeOptions{mergeRemote='', mergeTarget='master', mergeStrategy='default', fastForwardMode='--ff'}
 > git rev-parse /master^{commit} # timeout=10
FATAL: Command "git rev-parse /master^{commit}" returned status code 128:
stdout: /master^{commit}

stderr: fatal: ambiguous argument '/master^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

hudson.plugins.git.GitException: Command "git rev-parse /master^{commit}" returned status code 128:
stdout: /master^{commit}

stderr: fatal: ambiguous argument '/master^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1710)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1686)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1682)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1312)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1324)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:678)
	at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
	at hudson.plugins.git.extensions.impl.PreBuildMerge.decorateRevisionToBuild(PreBuildMerge.java:64)
	at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:965)
	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1054)
	at hudson.scm.SCM.checkout(SCM.java:485)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
	at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
	at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
	at hudson.model.Run.execute(Run.java:1738)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
 > git tag -l jenkins-HelloWorldJava-7 # timeout=10
 > git tag -a -f -m Jenkins Build #7 jenkins-HelloWorldJava-7-FAILURE # timeout=10
ERROR: Step ‘Set build status on GitHub commit’ aborted due to exception: 
java.io.IOException: Cannot retrieve Git metadata for the build
	at org.jenkinsci.plugins.github.util.BuildDataHelper.getCommitSHA1(BuildDataHelper.java:33)
	at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:128)
	at com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:111)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
	at hudson.model.Build$BuildExecution.post2(Build.java:185)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
	at hudson.model.Run.execute(Run.java:1763)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE

ngsbioin...@gmail.com

unread,
Feb 22, 2016, 12:38:12 PM2/22/16
to Jenkins Users
I think I found the appropriate plugin to use:  https://wiki.jenkins-ci.org/display/JENKINS/Multi-Branch+Project+Plugin
Reply all
Reply to author
Forward
0 new messages