Comments (12)
Hi, glad you use it :-)
Funny thing, I did test multilevel / composite branch names, especially since I use gitflow. But, I did notice you are probably using version 0.1.1. And this is entirely my fault. I committed the code to mine and Jenkins fork, but didn't release the plugin.
So, just did that. You should be seeing version 0.2.0 in your Jenkins plugin update center, and if not (it takes time to propagate), you can find it @ jenkins repo.
Before we go on, please use that updated version. In log, there should be some more info, e.g.
INFO: gitlab web hook triggered for repo url http://gitlab.example.com/myproject
INFO: with payload: ... here comes the payload from gitlab, you can delete sensitive data
Please send me this info.
It should be enough for me to be able to figure out the cause.
from jenkins-gitlab-hook-plugin.
Thanks for replying,
You're right, I'm using version 0.1.1.
No update is available for now, I'm waiting for propagation and will come back then.
from jenkins-gitlab-hook-plugin.
Ok, I'm on version 0.2.0 now.
I created a new branch story/test and push it to gitlab
Here the jenkins log :
INFO: gitlab web hook triggered for repo url http://gitlab.example.com/myproject and test branch
INFO: with payload: {"before"=>"0000000000000000000000000000000000000000", "after"=>"3e213054239ede90231239a41a4308bbf51df0a4", "ref"=>"refs/heads/story/test", "user_id"=>14, "user_name"=>"Me ****", "repository"=>{"name"=>"myproject", "url"=>"http://gitlab.example.com/myproject", "description"=>nil, "homepage"=>"http://gitlab.example.com/myproject"}, "commits"=>[{"id"=>"3e213054239ede90231239a41a4308bbf51df0a4", "message"=>"Dummy test 1", "timestamp"=>"2012-12-06T11:25:31+01:00", "url"=>"http://gitlab.dev.example.com/myproject/commits/3e213054239ede90231239a41a4308bbf51df0a4", "author"=>{"name"=>"Me ****", "email"=>"[email protected]"}}], "total_commits_count"=>1}
INFO: project build-webapp doesn't match the test branch
WARNING: no project references the given repo url and commit branch
(urls, names and mails manually changed)
I expected to see story/test
instead of test
in the first line. Maube this is the issue ?
from jenkins-gitlab-hook-plugin.
Yes, you are right, I've been using only the last in payload["ref"].split("/").
Wait for a fix...
from jenkins-gitlab-hook-plugin.
I can't test my fix (and I am not used to code in ruby), but I think something like this could be fix the issue :
def get_commit_branch(payload)
payload["ref"].split("/")[2..-1].join("/") if payload && payload["ref"]
end
in models/gitlab_web_hook_api.rb (lines 115-117)
from jenkins-gitlab-hook-plugin.
Excellent, I wrote it a bit different, to ensure the intent is clear (removing head and ref from the entire path). I can't release from here but the update will be available later today. Let me know how it goes after you try it.
from jenkins-gitlab-hook-plugin.
Thanks,
I cannot wait to see this working ^^
from jenkins-gitlab-hook-plugin.
OK, so the new version 0.2.3 is up with another fix.
It should now accept branches like refactoring-what-not.
If you're impatient, you can find it here. Fingers crossed :-)
from jenkins-gitlab-hook-plugin.
INFO: gitlab web hook triggered for repo url http://gitlab.example.com/myproject and story/test branch
INFO: with payload: {"before"=>"3e213054239ede90231239a41a4308bbf51df0a4", "after"=>"04a609729d97f803f084695909a2751ec2172b9e", "ref"=>"refs/heads/story/test", "user_id"=>14, "user_name"=>"Me **********", "repository"=>{"name"=>"myproject", "url"=>"http://gitlab.example.com/myproject", "description"=>nil, "homepage"=>"http://gitlab.example.com/myproject"}, "commits"=>[{"id"=>"04a609729d97f803f084695909a2751ec2172b9e", "message"=>"Dummy test 5", "timestamp"=>"2012-12-07T15:59:28+01:00", "url"=>"http://gitlab.example.com/myproject/commits/04a609729d97f803f084695909a2751ec2172b9e", "author"=>{"name"=>"Me ********", "email"=>"[email protected]"}}], "total_commits_count"=>1}
INFO: project build-webapp matches the story/test branch
INFO: project build-webapp doesn't match the master branch
INFO: project build-webapp doesn't match the ** branch
WARNING: could not determine master project, please create a project for the repo (usually for the master branch)
My job is not triggered :'(
from jenkins-gitlab-hook-plugin.
Yep, residue from another feature I am building (automatic Jenkins project creating per Gitlab branch).
Switched it off, should work now. New version @ jenkins repo, and please test as usual :-)
from jenkins-gitlab-hook-plugin.
Tried this morning.
Job is well triggered ^^
Thanks a lot.
from jenkins-gitlab-hook-plugin.
Great :-)
from jenkins-gitlab-hook-plugin.
Related Issues (20)
- build_now works on separate servers?
- "no project references the given repo url and commit branch" muti-branch freestyle HOT 2
- naming autogenerated project does not postfix with branchname on first creation HOT 2
- build_now hook not working on Jenkins 1.620 and Gitlab 7.8.2 HOT 3
- How could I skip building based on commit message? (Enhancement Request?) HOT 1
- Does not install on Jenkins 1.635 HOT 2
- Don't trigger a build on commit notifications in multiple scms is wrong HOT 1
- Support for git sparsepath HOT 1
- Support for multiple projects HOT 2
- Pipeline projects
- Jenkins does not run build on the "Tag Push Events" trigger from Web Hook HOT 1
- plugin does not work with (multibranch) pipeline projects?
- jenkins2 : GitLab CI Service URL in old format when using the plugin
- how to reference nested payload value
- 应该如何正确填写回调URL,我按照文档书写的地址一致验证不过 HOT 4
- Installed but not show in jenkins
- How to read json payload from gitlab webhook in Jenkins
- unsupported Java version: 11
- unsupported Java version: 11 HOT 9
- Configure Clouds in jenkins With docker give error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jenkins-gitlab-hook-plugin.