You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
I added following webhooks for Push and Tag Push Events in gitlab :
http://jenkins.local/gitlab/build_now/my-project
my-project is a Jenkins Pipeline project. When i test the webhooks, i get the following HTTP Response :
NoMethodError at /build_now/my-project
undefined method `getQuietPeriod' for nil:NilClass
file: api.rb location: POST /build_now/:project_name line: 43
with the following stack-trace :
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/api.rb in POST /build_now/:project_name
project.scheduleBuild2(project.getQuietPeriod(), cause_builder.with(details), actions_builder.with(project, details))
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb in call
status, headers, body = @app.call(env)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb in call
app.call env
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb in call
status, headers, body = app.call(env)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/base.rb in call
result or app.call(env)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb in call
status, headers, body = @app.call(env)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/nulllogger.rb in call
@app.call(env)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/vendor/gems/gems/rack-1.4.1/lib/rack/head.rb in call
status, headers, body = @app.call(env)
/var/lib/jenkins/plugins/gitlab-hook/WEB-INF/classes/models/root_action.rb in call
GitlabWebHook::Api.new.call(env)
file:/var/lib/jenkins/plugins/ruby-runtime/WEB-INF/lib/jruby-rack-1.1.13.1.jar!/rack/handler/servlet.rb in call
self.class.response.new(@app.call(create_env(servlet_env)))
The text was updated successfully, but these errors were encountered:
This issue might be linked to #31 since my build is a Pipeline build.
I found out that there might be a bug in models/services/get_jenkins_projects.rb :
projects = Java.jenkins.model.Jenkins.instance.getAllItems(AbstractProject.java_class).map do |jenkins_project|
This won't return the pipeline jobs. When I removed AbstractProject.java_class to include pipeline jobs, i get :
undefined method 'scm' for OrgJenkinsciPluginsWorkflowJob::WorkflowJob
I had the same problem, but found a workaround. I use the same web hook as @wuzhaozhongguo, but I opened the project configuration screen in Jenkins and copied the 'Project name' field from there. After that it worked.
I added following webhooks for
Push
andTag Push
Events in gitlab :my-project is a Jenkins Pipeline project. When i test the webhooks, i get the following HTTP Response :
with the following stack-trace :
The text was updated successfully, but these errors were encountered: