ghprb: git rev-parse ${sha1}^{commit}: ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Trying one of the latest versions and it is failing š¢
Versions
- Jenkins 1.632
- Plugins
- GitHub: 1.14.0
- GitHub API: 1.69
- GitHub Pull Request Builder: 1.29
- Credentials: 1.24
- Plain Credentials: 1.1
ERROR
Started by timer
Building in workspace /var/lib/jenkins/jobs/BUILD-ISP-pull-requests/workspace
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository https://github.intuit.com/servicesplatform-node/sp-quality
> git init /var/lib/jenkins/jobs/BUILD-ISP-pull-requests/workspace # timeout=10
Fetching upstream changes from https://github.intuit.com/servicesplatform-node/sp-quality
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.username mdesales # timeout=10
> git config --local credential.helper store --file=/tmp/git5544296394853754862.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.intuit.com/servicesplatform-node/sp-quality +refs/heads/*:refs/remotes/origin/*
> git config --local --remove-section credential # timeout=10
> git config remote.origin.url https://github.intuit.com/servicesplatform-node/sp-quality # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.intuit.com/servicesplatform-node/sp-quality # timeout=10
Fetching upstream changes from https://github.intuit.com/servicesplatform-node/sp-quality
using .gitcredentials to set credentials
> git config --local credential.username mdesales # timeout=10
> git config --local credential.helper store --file=/tmp/git8157565619616801356.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.intuit.com/servicesplatform-node/sp-quality +refs/pull/*:refs/remotes/origin/pr/*
> git config --local --remove-section credential # timeout=10
> git rev-parse origin/${sha1}^{commit} # timeout=10
> git rev-parse ${sha1}^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Skipping Cobertura coverage report as build was not UNSTABLE or better ...
ERROR: Publisher 'Set build status on GitHub commit' aborted due to exception:
java.io.IOException: Cannot determine sha1 of the commit. The status cannot be reported
at org.jenkinsci.plugins.github.util.BuildDataHelper.getCommitSHA1(BuildDataHelper.java:38)
at com.cloudbees.jenkins.GitHubCommitNotifier.updateCommitStatus(GitHubCommitNotifier.java:111)
at com.cloudbees.jenkins.GitHubCommitNotifier.perform(GitHubCommitNotifier.java:90)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
Jenkins Settings
I tested the following configurationā¦

And Jenkins could successfully write to the Pull Request in our GitHub Enterprise
## New Job Settings
I then setup the Jenkins job as described in the README.md⦠The GitHub Project URL is setupā¦
- GitHub Project

- Source Code Management (Git)

- Build Triggers

- Build Environment (specific for Node.js projects)

- Error messageā¦
This is the result of the Job⦠It cannot find the PR⦠š¦

Please help!!!
thanks Marcello
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 1
- Comments: 30
Commits related to this issue
- Merge pull request #347 from DavidTanner/fixes Check if skipBuild is empty or null — committed to mmitche/ghprb by DavidTanner 8 years ago
We have the same issue. Since the upgrade all merge requests immediately fail with:
This just started happening in our jenkins as well. not sure if anything (plugin or jenkins itself) was updated when it happened, but it seems like no.
@markus2330 see the fix described here, it worked for me: https://github.com/janinko/ghprb/issues/412#issuecomment-219096442
just make sure you use the write config setting to add the jvm args, it differs by linux distribution.
As @pulse00 says you have to update the plugin.
It worked for me.
@bparees thanks for pointing in the right direction. for more info: