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
Manual Parameterized for variable ${sha1} Works
When I setup the parameterized builds with the variable sha1 it works as expected:
Started by user anonymous
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
> 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
> 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/git6462499846997227053.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.intuit.com/servicesplatform-node/sp-quality.git +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.git # 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.git # timeout=10
Fetching upstream changes from https://github.intuit.com/servicesplatform-node/sp-quality.git
using .gitcredentials to set credentials
> git config --local credential.username mdesales # timeout=10
> git config --local credential.helper store --file=/tmp/git8670292960922547228.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://github.intuit.com/servicesplatform-node/sp-quality.git +refs/pull/*:refs/remotes/origin/pr/*
> git config --local --remove-section credential # timeout=10
> git rev-parse refs/remotes/origin/pr/37/head^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/pr/37/head^{commit} # timeout=10
Checking out Revision 0845549559f5644431330afd4753ef4344e61624 (refs/remotes/origin/pr/37/head)
> git config core.sparsecheckout # timeout=10
> git checkout -f 0845549559f5644431330afd4753ef4344e61624
First time build. Skipping changelog.
[workspace] $ /bin/sh -xe /tmp/hudson8575463794487670741.sh
- Status back to the Pull Request Worked!
Looking at the logs, I see that the plugin schedules the build of 2 other pull requests, other than mine created for tests... But the Jenkins job's "Build History" is not populated with those changes. Once I try to save the settings, I see that the plugin stops and the request to the change fails...
Oct 15, 2015 6:19:07 PM org.jenkinsci.plugins.ghprb.GhprbTrigger stop
INFO: Stopping the ghprb trigger for project BUILD-ISP-pull-requests
Oct 15, 2015 6:19:09 PM org.jenkinsci.plugins.ghprb.GhprbTrigger start
INFO: Starting the ghprb trigger for the BUILD-ISP-pull-requests job; newInstance is true
Oct 15, 2015 6:19:10 PM hudson.plugins.chucknorris.CordellWalkerRecorder <init>
INFO: Chuck Norris is activated
Oct 15, 2015 6:19:10 PM hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusiness queueChangeSet
INFO: Queue of changeset A jobs/BUILD-ISP-pull-requests/config.xml
aborted (scm manipulator not settled !)
The error above is coming from the setup of the SCM https://github.com/jenkinsci/scm-sync-configuration-plugin/blob/master/src/main/java/hudson/plugins/scm_sync_configuration/ScmSyncConfigurationBusiness.java#L133
Please help...!
If you look at the first line of the build log you will notice that the job was triggered by a timer and not the pull request plugin. That is what the variable sha1 was never populated
@DavidTanner What else do I need to make it be triggered by GitHub? I followed all the instructions...
I actually see now where the problem might be... Our GitHub Enterprise might not have connectivity to my Jenkins Server:
All the events timed out...
I will discuss with the team here :(
Uncheck the webhooks section, then it will run every minute to check for pull requests.
@DavidTanner I have used "H/5 * * * *" as the cron setting and I disabled Use github hooks for build triggering... However, nothing has happened... :(
Also, you mentioned that if it will be polling, would the SHA1 variable then be available? Can you please point me to the exact setting because I still cannot get it to work :(
thanks for helping!
Once you uncheck the box then the job should run as scheduled. Check the system logs to verify that it is doing something. The first time it picks up a pull request it should comment asking for someone to whitelist it. You also haven't set a whitelist branch, or any Admins so you will need to add a user that can go and approve PRs for testing.
Hi @DavidTanner
I unchecked a few things and tried to add them... Here are the complete settings right now...
Those settings are generating the following errors...
Initial Settings
Oct 20, 2015 2:25:50 AM org.jenkinsci.plugins.ghprb.GhprbTrigger stop
INFO: Stopping the ghprb trigger for project ISP-PullRequests
Oct 20, 2015 2:25:51 AM org.jenkinsci.plugins.github.webhook.WebhookManager$1 run
INFO: GitHub webhooks activated for job ISP-PullRequests with [GitHubRepositoryName[host=github.intuit.com,username=servicesplatform-node,repository=sp-quality]] (events: [PUSH])
Oct 20, 2015 2:25:52 AM org.jenkinsci.plugins.ghprb.GhprbTrigger start
INFO: Starting the ghprb trigger for the ISP-PullRequests job; newInstance is true
Oct 20, 2015 2:25:53 AM hudson.model.listeners.ItemListener forAll
WARNING: failed to send event to listener of class hudson.plugins.disk_usage.DiskUsageItemListener
java.lang.NullPointerException
Oct 20, 2015 2:25:54 AM hudson.plugins.chucknorris.CordellWalkerRecorder <init>
INFO: Chuck Norris is activated
Oct 20, 2015 2:25:54 AM hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusiness queueChangeSet
INFO: Queue of changeset A jobs/ISP-PullRequests/config.xml
aborted (scm manipulator not settled !)
Then, I think I added whitelists, organizations, etc... and I started getting an entry like the one below at every trigger....
Errors in the logs
Oct 20, 2015 2:27:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest checkMergeable
SEVERE: Couldn't obtain mergeable status.
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@7f6f707; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:1298)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1199)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:830)
at org.kohsuke.github.Requester.parse(Requester.java:467)
at org.kohsuke.github.Requester._to(Requester.java:227)
at org.kohsuke.github.Requester.to(Requester.java:201)
at org.kohsuke.github.GHPullRequest.populate(GHPullRequest.java:196)
at org.kohsuke.github.GHPullRequest.getMergeable(GHPullRequest.java:169)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.checkMergeable(GhprbPullRequest.java:354)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:240)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:282)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:221)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Oct 20, 2015 2:27:01 AM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.ghprb.GhprbTrigger.run() failed for hudson.model.FreeStyleProject@62e30482[ISP-PullRequests]
java.lang.Error: java.io.IOException: Failed to deserialize
at org.kohsuke.github.Requester$1.fetch(Requester.java:396)
at org.kohsuke.github.Requester$1.hasNext(Requester.java:363)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:242)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:282)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:221)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Failed to deserialize
at org.kohsuke.github.Requester.parse(Requester.java:464)
at org.kohsuke.github.Requester.access$300(Requester.java:64)
at org.kohsuke.github.Requester$1.fetch(Requester.java:387)
... 19 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@579121b1; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2931)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2873)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
at org.kohsuke.github.Requester.parse(Requester.java:462)
... 21 more
Oct 20, 2015 2:27:03 AM hudson.model.listeners.ItemListener forAll
WARNING: failed to send event to listener of class hudson.plugins.disk_usage.DiskUsageItemListener
java.lang.NullPointerException
Oct 20, 2015 2:27:04 AM hudson.model.listeners.ItemListener forAll
WARNING: failed to send event to listener of class hudson.plugins.disk_usage.DiskUsageItemListener
java.lang.NullPointerException
Restarted Jenkins and got the following logs... One of the things that called my attention was the following... (The full logs are below)...
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest getAuthorEmail
SEVERE: Unable to fetch author info for 46
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest <init>
INFO: Created Pull Request #46 on servicesplatform-node/sp-quality by mdesales () updated at: 10/20/15 2:22 AM SHA: master
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest checkMergeable
SEVERE: Couldn't obtain mergeable status.
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@46be6268; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:1298)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1199)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:830)
at org.kohsuke.github.Requester.parse(Requester.java:467)
at org.kohsuke.github.Requester._to(Requester.java:227)
at org.kohsuke.github.Requester.to(Requester.java:201)
at org.kohsuke.github.GHPullRequest.populate(GHPullRequest.java:196)
at org.kohsuke.github.GHPullRequest.getMergeable(GHPullRequest.java:169)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.checkMergeable(GhprbPullRequest.java:354)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:240)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
Full logs after Jenkins restarted
ct 20, 2015 2:39:46 AM hudson.plugins.scm_sync_configuration.ScmSyncConfigurationBusiness queueChangeSet
INFO: Queue of changeset A jobs/BUILD-ISP-Pull-Requests/config.xml
aborted (scm manipulator not settled !)
Oct 20, 2015 2:39:46 AM org.mongodb.morphia.logging.MorphiaLoggerFactory chooseLoggerFactory
INFO: LoggerImplFactory set to org.mongodb.morphia.logging.jdk.JDKLoggerFactory
Oct 20, 2015 2:39:47 AM org.mongodb.morphia.converters.DefaultConverters addTypedConverter
WARNING: Added duplicate converter for class java.lang.Class ; [com.groupon.jenkins.mongo.SpecialClassConverter@7d14bf4e, org.mongodb.morphia.converters.ClassConverter@1b95c1cc]
Oct 20, 2015 2:39:47 AM org.jenkinsci.plugins.ghprb.GhprbTrigger start
INFO: Starting the ghprb trigger for the BUILD-ISP-Pull-Requests job; newInstance is false
Oct 20, 2015 2:39:48 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Oct 20, 2015 2:39:48 AM jenkins.advancedqueue.PrioritySorterPlugin init
INFO: Configuring the Priority Sorter ...
Oct 20, 2015 2:39:48 AM jenkins.advancedqueue.PrioritySorterPlugin init
INFO: Sorting existing Queue ...
Oct 20, 2015 2:39:48 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Oct 20, 2015 2:39:48 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Download metadata. 1 ms
Oct 20, 2015 2:39:49 AM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 44715
Oct 20, 2015 2:39:49 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Oct 20, 2015 2:39:49 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@295c2171: display name [Root WebApplicationContext]; startup date [Tue Oct 20 02:39:49 PDT 2015]; root of context hierarchy
Oct 20, 2015 2:39:49 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@295c2171]: org.springframework.beans.factory.support.DefaultListableBeanFactory@51db1ae4
Oct 20, 2015 2:39:49 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@51db1ae4: defining beans [filter,legacy]; root of factory hierarchy
Oct 20, 2015 2:39:49 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest getAuthorEmail
SEVERE: Unable to fetch author info for 46
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest <init>
INFO: Created Pull Request #46 on servicesplatform-node/sp-quality by mdesales () updated at: 10/20/15 2:22 AM SHA: master
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest checkMergeable
SEVERE: Couldn't obtain mergeable status.
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@46be6268; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:1298)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1199)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:830)
at org.kohsuke.github.Requester.parse(Requester.java:467)
at org.kohsuke.github.Requester._to(Requester.java:227)
at org.kohsuke.github.Requester.to(Requester.java:201)
at org.kohsuke.github.GHPullRequest.populate(GHPullRequest.java:196)
at org.kohsuke.github.GHPullRequest.getMergeable(GHPullRequest.java:169)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.checkMergeable(GhprbPullRequest.java:354)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:240)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:282)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:221)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Oct 20, 2015 2:40:01 AM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.ghprb.GhprbTrigger.run() failed for hudson.model.FreeStyleProject@3731f8c1[BUILD-ISP-Pull-Requests]
java.lang.Error: java.io.IOException: Failed to deserialize
at org.kohsuke.github.Requester$1.fetch(Requester.java:396)
at org.kohsuke.github.Requester$1.hasNext(Requester.java:363)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:242)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:282)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:221)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Failed to deserialize
at org.kohsuke.github.Requester.parse(Requester.java:464)
at org.kohsuke.github.Requester.access$300(Requester.java:64)
at org.kohsuke.github.Requester$1.fetch(Requester.java:387)
... 19 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@425c8c5b; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2931)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2873)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
at org.kohsuke.github.Requester.parse(Requester.java:462)
... 21 more
Oct 20, 2015 2:40:01 AM org.jenkinsci.plugins.ghprb.GhprbPullRequest checkMergeable
SEVERE: Couldn't obtain mergeable status.
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@46cc4d5b; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectReader._initForReading(ObjectReader.java:1298)
at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1199)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:830)
at org.kohsuke.github.Requester.parse(Requester.java:467)
at org.kohsuke.github.Requester._to(Requester.java:227)
at org.kohsuke.github.Requester.to(Requester.java:201)
at org.kohsuke.github.GHPullRequest.populate(GHPullRequest.java:196)
at org.kohsuke.github.GHPullRequest.getMergeable(GHPullRequest.java:169)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.checkMergeable(GhprbPullRequest.java:354)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:240)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:282)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:221)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Oct 20, 2015 2:40:01 AM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.ghprb.GhprbTrigger.run() failed for hudson.model.FreeStyleProject@3731f8c1[BUILD-ISP-Pull-Requests]
java.lang.Error: java.io.IOException: Failed to deserialize
at org.kohsuke.github.Requester$1.fetch(Requester.java:396)
at org.kohsuke.github.Requester$1.hasNext(Requester.java:363)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.tryBuild(GhprbPullRequest.java:242)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:126)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:150)
at org.jenkinsci.plugins.ghprb.GhprbRepository.check(GhprbRepository.java:124)
at org.jenkinsci.plugins.ghprb.Ghprb.run(Ghprb.java:118)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:248)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:282)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:221)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:51)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Failed to deserialize
at org.kohsuke.github.Requester.parse(Requester.java:464)
at org.kohsuke.github.Requester.access$300(Requester.java:64)
at org.kohsuke.github.Requester$1.fetch(Requester.java:387)
... 19 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: java.io.StringReader@738f658c; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164)
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2931)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2873)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2034)
at org.kohsuke.github.Requester.parse(Requester.java:462)
... 21 more
@marcellodesales Do you have any success with this?
@marcellodesales I just update jenkins and I got the same problem
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.
(turns out our jenkins was updated)
We have the same issue. Since the upgrade all merge requests immediately fail with:
GitHub pull request #700 of commit 5bfc69338903769c094cd1b4caf95db71f4f5c57, no merge conflicts.
Baue auf Slave debian-stable-mm (jessie stable debian) in Arbeitsbereich /home/jenkins/workspace/workspace/elektra-mergerequests
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
Cloning the remote Git repository
Cloning repository git://github.com/ElektraInitiative/libelektra.git
> git init /home/jenkins/workspace/workspace/elektra-mergerequests # timeout=10
Fetching upstream changes from git://github.com/ElektraInitiative/libelektra.git
> git --version # timeout=10
> git -c core.askpass=true fetch --tags --progress git://github.com/ElektraInitiative/libelektra.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url git://github.com/ElektraInitiative/libelektra.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url git://github.com/ElektraInitiative/libelektra.git # timeout=10
Fetching upstream changes from git://github.com/ElektraInitiative/libelektra.git
> git -c core.askpass=true fetch --tags --progress git://github.com/ElektraInitiative/libelektra.git +refs/pull/*:refs/remotes/origin/pr/*
> 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.
[WARNINGS] Skipping publisher since build result is FAILURE
Archiviere Artefakte
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE
@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.
@bparees thanks for pointing in the right direction. for more info:
- https://wiki.jenkins-ci.org/display/SECURITY/Jenkins+Security+Advisory+2016-05-11
- https://wiki.jenkins-ci.org/display/JENKINS/Plugins+affected+by+fix+for+SECURITY-170
As @pulse00 says you have to update the plugin.
It worked for me.
@pulse00 update plugin also works to me 👍
Thanks very much for this fix. Saved me going bald early 👍
I get the same issue Jenkins version 2.27 Plugin version 1.33.1 OS X El Capitan
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
ERROR: Step ‘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:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1745)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:401)
Finished: FAILURE
I haven't tried to add the JAVA_ARGS. Only updated everything to latest hoping that it will be resolved.
Any suggestions?
@Nimrodda try updating the plugin. It worked for me.
@devaddiction Thanks for helping. I think I have the latest version of the plugin 1.33.1. At least Jenkins doesn't show that there is an update available. Which version do you have?
I got the same problem with @Nimrodda , using latest version of plugin and Jenkins 2.7.4 :(
@tucq88 I got the same problem too with the latest jenkins and the latest plugin, were you able to resolve this?
@jasjuang Pretty magic, I'm not sure that I could recall the solution here but will try. I just remember it about updating workflow not about ghprb plugin.
For all who did update ghprb plugin did you upgrade to 1.32.3 as listed in the https://wiki.jenkins-ci.org/display/JENKINS/Plugins+affected+by+fix+for+SECURITY-170?
Our Eng IT just upgraded the team's Jenkins to 2.7.20-2 Cloudbees version and it breaks the ghprb plugin. I am trying 1.32.3 now on staging instance.
I'm using ghprb 1.33.4 and have been getting the error listed on this page. Upgrading didn't seem to solve this issue for me.
But when I changed my branch specifier under "Branches to Build" to ${ghprbActualCommit}, it worked for me. I don't have insight into why, but that could be a workaround for now.
From the jenkinsci/ghprb-plugin page:
If you want to use the actual commit in the pull request, use ${ghprbActualCommit} instead of ${sha1}
Got the same issue. ghprb 1.38.0. We are using Pipeline script from SCM
Has anyone solved this?