jyrkiput / hudson-gerrit-plugin Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://wiki.hudson-ci.org/display/HUDSON/Gerrit+Plugin
Home Page: http://wiki.hudson-ci.org/display/HUDSON/Gerrit+Plugin
Hi again,
This isn't exactly a bug but I've noticed that if I cancel a build then it will be marked as verified -1. What I'd really like is if it would just pretend that the build had never been started so that it can test that build again. Actually, a better idea might be if it added a comment to gerrit that doesn't affect the score that says 'build cancel - will test again later'...
Just ideas - it isn't a huge issue for us but we do have to upload a new change to trigger a new build which feels a little too manual.
-mark
After building, the plugin tries to approve a commit but I get this:
Connection timed out
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.(Socket.java:375)
at java.net.Socket.(Socket.java:189)
at com.sshtools.j2ssh.net.SocketTransportProvider.(Unknown Source)
at com.sshtools.j2ssh.net.TransportProviderFactory.connectTransportProvider(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at hudson.plugins.gerrit.ssh.SSHMarker.connect(SSHMarker.java:32)
at hudson.plugins.gerrit.GerritNotifier.verifyGerrit(GerritNotifier.java:155)
at hudson.plugins.gerrit.GerritNotifier.perform(GerritNotifier.java:201)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:600)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:598)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:528)
at hudson.model.Run.run(Run.java:1264)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:122)
Finished: ABORTED
Is there a way to get any info of what's happening.
I can't make it work.
I'm trying to use the Gerrit Hudson plugin with our project. We use Git and Hudson already and the Gerrit plugin seems to be an excellent addition to what we do (currently checking out changes and trying to build them manually). We've followed the instructions over here http://wiki.hudson-ci.org/display/HUDSON/Gerrit+Plugin
It kind of almost works. The connectivity is fine - it is able to clone the repository etc and posts comments back to Gerrit but all the builds fail. We get this output (I've removed our company name from the output):
Started by user mbutcher
Checkout:workspace / c:\hudson\jobs\company-native-all-verify\workspace - hudson.remoting.LocalChannel@10ace8d
Using strategy: Gerrit
Checkout:workspace / c:\hudson\jobs\company-native-all-verify\workspace - hudson.remoting.LocalChannel@10ace8d
GitAPI created
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://[email protected]:29418/code/native
[workspace] $ c:/cygwin/bin/git.exe fetch -t ssh://[email protected]:29418/code/native +refs/changes/:refs/remotes/origin/
[workspace] $ c:/cygwin/bin/git.exe ls-tree HEAD
[workspace] $ c:/cygwin/bin/git.exe log --all --pretty=format:'%H#%ct'
FATAL: Invalid id: 99226a05862ba49fdb758a47baf1e9d96c6b02f
java.lang.IllegalArgumentException: Invalid id: 99226a05862ba49fdb758a47baf1e9d96c6b02f
at org.spearce.jgit.lib.ObjectId.fromString(ObjectId.java:230)
at hudson.plugins.git.util.GerritBuildChooser.parseCommit(GerritBuildChooser.java:108)
at hudson.plugins.git.util.GerritBuildChooser.sortRevList(GerritBuildChooser.java:95)
at hudson.plugins.git.util.GerritBuildChooser.getCandidateRevisions(GerritBuildChooser.java:51)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:604)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:535)
at hudson.FilePath.act(FilePath.java:753)
at hudson.FilePath.act(FilePath.java:735)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:535)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1044)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411)
at hudson.model.Run.run(Run.java:1253)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:306)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:127)
I can understand why it is failing - to a degree - because 99226a05862ba49fdb758a47baf1e9d96c6b02f is not a valid Gerrit change Id. It should be e99226a05862ba49fdb758a47baf1e9d96c6b02f (leading e). Also interesting is that when the build fails Hudson adds a comment to the Gerrit change saying that the build failed but it is to a different commit than the one that it fails to retrieve (i.e. I72030c6a4ea67913e26c1050de4ee8cfe0ab3d38 instead of Ie99226a05862ba49fdb758a47baf1e9d96c6b02f ).
Any ideas on what we can do?
-mark
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.