GitLab using Webhook to triggered Jenkins build project
===
## Create Folder
1. [New Item]
2. Enter an item name
3. Choice [Folder]
4. Press [OK]
5. Select folder on Jenkins view
<kbd></kbd>
## Create Project
1. [New Item].
2. Enter an item name.
3. Choose [Build Free-Style Project].
4. Press [OK].
5. Select project on Jenkins view.
<kbd></kbd>
## Configure Project - Jenkins
1. Click [Configure].
<kbd></kbd>
2. ~~Checked [Restrict where this project can be run] and fill in the `appiumACE` string to [Label Expression]~~
3. Select [Git] options as a repository source and enter repository url, finally select credential that log in to the SELab GitLab Server, if not exists, Add it.(The URL must be end with .git).
4. If necessary, specify the branch in [Branch Specifier (blank for 'any')], what you want build.
5. Checked [Build when a change is pushed to GitLab.....]
6. (Option)Choose Post-build action.
7. Apply and saved it.
<kbd></kbd>
## Configure Project - GitLab
1. Go to [Webhooks] page.
<kbd></kbd>
2. Paste url from Jenkins project.
:::danger
URL some segments must be replaced, take below project url as example:
Before:https://service.selab.ml/ci/job/SE-MOB1/job/backend/
After:https://service.selab.ml/ci/project/SE-MOB1/backend/
<kbd></kbd>
:::
3. Follow the configuration below
<kbd></kbd>
4. Click [Test] -> [Push events] to checking the webhooks has already triggered the Jenkins project.
<kbd></kbd>
5. Success.
<kbd></kbd>
{"metaMigratedAt":"2023-06-17T15:39:00.620Z","metaMigratedFrom":"Content","title":"GitLab using Webhook to triggered Jenkins build project","breaks":true,"contributors":"[{\"id\":\"78616a68-3de8-40e2-a1af-0ebde9abf456\",\"add\":1987,\"del\":209}]"}