First, the role
- When implemented using webhooks git push client code into the gitlab, Jenkins will go immediately gitlab pulling code and build.
Second, step
1, install the plug
- ruby_runtime (Hook plugin depends on the plug-in)
- Gitlab Hook Plugin
2, Jenkins global configuration
"System Management" -> "System Settings"
Description: play two hooks, to develop building branch
3, Jenkins project configuration
Project -> "Configuration"
Note: Check the "poll SCM", but time expression is blank.
4, gitlab webhook configuration
note:
- url是http://jenkins-server/gitlab/notify_commit
- Check the "Push events"
- NA SSL
After that, click below the "test" button to test
Third, the test
After modifying the code,
- git add --all
- git commit -m"xxx"
- git push origin HEAD:dev
View compilation of case jenkins.