Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to v1.1.1 for Multi SCMs plugin support #39

Merged
merged 2 commits into from Nov 17, 2014

Conversation

Projects
None yet
3 participants
@GuyCheung
Copy link
Contributor

GuyCheung commented Sep 3, 2014

Hi
I found the plugin will not work when I use Multi SCMs plugin set Git repo, so I have add the code for Jenkins Multi SCMs plugin support.
Please have code review for this

@elvanja

This comment has been minimized.

Copy link
Owner

elvanja commented Sep 4, 2014

Hey @GuyCheung, thank you very much for the fix!
I'll be sure to take a look these days and incorporate it.
Much appreciated :-)

@elvanja elvanja added the enhancement label Oct 25, 2014

@Brawnd0

This comment has been minimized.

Copy link

Brawnd0 commented Oct 28, 2014

I'm testing out GuyCheung:feature-support_multi_scms branch right now. So far everything working great. Thank you both!

@elvanja

This comment has been minimized.

Copy link
Owner

elvanja commented Oct 30, 2014

OK, this has been merged, into https://github.com/elvanja/jenkins-gitlab-hook-plugin/tree/feature/multiple_smcs branch for now. Would either of you mind checking out this version? It should be pretty much in line with what @GuyCheung wrote, but merged with latest development on master. If it is working, I'll be releasing it in the next version (soon hopefully).

@Brawnd0

This comment has been minimized.

Copy link

Brawnd0 commented Oct 31, 2014

Getting an error when gitlab hook is invoked running commit fceac63
Unfortunately I upgrade Jenkins to 1.587 and a couple other plugins so I don't know whether the the new Gitlab Hook plugin is broken or the Jenkins/other plugins are at fault.
I'll do some digging and keep you posted.

Oct 31, 2014 12:46:27 PM SEVERE sun.reflect.NativeMethodAccessorImpl invoke0
undefined method `buildChooser' for #<Java::OrgJenkinsciPluginsMultiplescms::MultiSCM:0x30c9884d>
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `buildChooser' for #<Java::OrgJenkinsciPluginsMultiplescms::MultiSCM:0x30c9884d>
    at RUBY.matches_branch?(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:107)
    at RUBY.matches?(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/values/project.rb:48)
    at RUBY.matching(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/services/get_jenkins_projects.rb:27)
    at org.jruby.RubyArray.select(org/jruby/RubyArray.java:2417)
    at RUBY.matching(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/services/get_jenkins_projects.rb:26)
    at RUBY.get_projects_to_process(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:31)
    at RUBY.with(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:15)
    at RUBY.process_projects(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:47)
    at RUBY.POST /build_now(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:32)
    at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:118)
    at RUBY.compile!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265)
    at org.jruby.RubyProc.call(org/jruby/RubyProc.java:249)
    at RUBY.route!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835)
    at RUBY.route_eval(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:851)
    at RUBY.route!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835)
    at RUBY.process_route(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:872)
    at org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1174)
    at RUBY.process_route(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:870)
    at RUBY.route!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:834)
    at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
    at RUBY.route!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:833)
    at RUBY.dispatch!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:936)
    at RUBY.call!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769)
    at RUBY.invoke(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921)
    at org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1174)
    at RUBY.invoke(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921)
    at RUBY.call!(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:755)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/nulllogger.rb:9)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/head.rb:9)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:99)
    at RUBY.call(/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/root_action.rb:18)
    at RUBY.call(file:/var/lib/jenkins/plugins/ruby-runtime/WEB-INF/lib/jruby-rack-1.1.13.1.jar!/rack/handler/servlet.rb:22)
@Brawnd0

This comment has been minimized.

Copy link

Brawnd0 commented Oct 31, 2014

Rolled back to @GuyCheung's branch (7d552e3) and Gitlab hooks is working as expected. I can't do too much digging into the code right now, but I'm happy to try out any updates.

@elvanja

This comment has been minimized.

Copy link
Owner

elvanja commented Oct 31, 2014

Yep, this is related to my changes. Missed the part where build chooser selection was replaced (from @GuyCheung's solution). I've hopefully fixed this now. Latest commit in same branch should do it. It took a bit due to specs added, sorry. @Brawnd0 let me know how this goes. Thanks!

@Brawnd0

This comment has been minimized.

Copy link

Brawnd0 commented Oct 31, 2014

953607b is looking good!
Build is firing off as expected. I'll be putting the plugin to heavy use next week.
If any more issues pop up, I'll post them here. Either way I'll report back at the end of the week.
Thanks again @GuyCheung and @elvanja for the quick turn around and great plugin! Those autofilled parameters are awesome.

@elvanja

This comment has been minimized.

Copy link
Owner

elvanja commented Nov 1, 2014

Cool, that's good news :-)
I'll close this PR after your feedback.
Feel free to drop a few lines on how you're using it, might get new ideas.
Thank you for your time!

@Brawnd0

This comment has been minimized.

Copy link

Brawnd0 commented Nov 12, 2014

Hey @elvanja. I was pulled off the project(s) I'm using Gitlab hook and MultiSMC so I didn't get a lot of testing in. The test builds I did run (about 20) all worked flawlessly with various parameter usage. I should be able to start hammering it again in a week or 2. If this hasn't been merged by then, or I find a bug, I'll let you know.

@elvanja

This comment has been minimized.

Copy link
Owner

elvanja commented Nov 13, 2014

Great, thank you!

@elvanja elvanja merged commit 7d552e3 into elvanja:master Nov 17, 2014

@elvanja

This comment has been minimized.

Copy link
Owner

elvanja commented Nov 17, 2014

Merged into master. Closing the issue, feel free to reopen or submit a new one if problems arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.