-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins version: 1.599
Hi,
I tried to figure out how to setup the automatic project creation, but until now without success. Here are the steps what I did:
created a new project called 'template'
- parametrized build with string parameter BRANCH_TO_BUILD (default = master)
- parametrized build with string parameter REPOSITORY_URL
- Source Code Management --> Branch specifier: origin/${BRANCH_TO_BUILD}
- Source Code Management --> Repository URL: ${REPOSITORY_URL}
jenkins settings
- enabled Automatic project creation
- added the name 'template' to Last resort template
Then I added the build_now hook to a gitlab project web hook and clicked on test hook. When nothing occurred I had a look into the jenkins logs and found the following (I modified the gitlab payload part):
gitlab web hook triggered for
- repo url: git@example.com:diaspora/diaspora.git
- branch: master
- with payload:
{
"before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
"after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
"ref": "refs/heads/master",
"user_id": 4,
"user_name": "John Smith",
"project_id": 15,
"repository": { "name": "Diaspora", "url": "git@example.com:diaspora/diaspora.git", "description": "", "homepage": "http://example.com/diaspora/diaspora", "private": true },
"commits": [
Unknown macro: { "id"},
Unknown macro: { "id"}],
"total_commits_count": 2
}
Feb 24, 2015 1:51:17 PM INFO org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
matching projects:
Feb 24, 2015 1:25:38 PM SEVERE org.jruby.javasupport.JavaMethod invokeDirectWithExceptionHandling
undefined method `isOlderThan' for true:TrueClass
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `isOlderThan' for true:TrueClass
at RUBY.with(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/services/build_scm.rb:21)
at RUBY.from_template(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/create_project_for_branch.rb:37)
at RUBY.get_projects_to_process(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:53)
at RUBY.with(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/use_cases/process_commit.rb:15)
at RUBY.process_projects(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:45)
at RUBY.POST /build_now(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/api.rb:30)
at org.jruby.RubyMethod.call(org/jruby/RubyMethod.java:118)
at RUBY.compile!(/Users/Shared/Jenkins/Home/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!(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835)
at RUBY.route_eval(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:851)
at RUBY.route!(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:835)
at RUBY.process_route(/Users/Shared/Jenkins/Home/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(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:870)
at RUBY.route!(/Users/Shared/Jenkins/Home/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!(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:833)
at RUBY.dispatch!(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:936)
at RUBY.call!(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769)
at RUBY.invoke(/Users/Shared/Jenkins/Home/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(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:921)
at RUBY.call!(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:769)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:755)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/nulllogger.rb:9)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/head.rb:9)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/showexceptions.rb:21)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/sinatra-1.3.3/lib/sinatra/base.rb:99)
at RUBY.call(/Users/Shared/Jenkins/Home/plugins/gitlab-hook/WEB-INF/classes/models/root_action.rb:18)
at RUBY.call(file:/Users/Shared/Jenkins/Home/plugins/ruby-runtime/WEB-INF/lib/jruby-rack-1.1.13.1.jar!/rack/handler/servlet.rb:22)
Am I doing something wrong or is this a bug?
Thanks in advance
Christian