Target
- Intuitive build history name.
- GitLab’s Webhook triggers builds directly.
- Gets the user name of the operation, and can send a pin notification after completion.
The build history generated by default is only numeric, which seems very unintuitive.
Set the following
-
The Set Build Name is what each bar will look like in the end
-
Set Jenkins user build variables to get BUILD_USER, which is the current user
-
BUILD_NUMBER is the number, plus one each time
-
Commit and online_host are custom variables coming from here
Results the following
- clear
Gitlab’s Merge request triggered Jenkins’ build.
Build trigger
Jenkins Settings:
- Merge Request Events Build on Merge Request Events Build on Push Events
- Filter Branches by regex only master branches are accepted
Gitlab Settings:
- URL: Enter the address shown in Jenkins to see the image above.
- Select Merge Request Events only. Only Merge is triggered
- Do not check SSL verification
- You can test it by clicking the Test button
Notify:
Execute shell Command
curl -S -m 5 -H "X-TOKEN: 123456789099876588" "Our domain name http://notify.. Com/API/dingtalk/message/send? Receiver =$RECEIVER&content=$CONTENT"
Copy the code
This notice website is set up by our company.
Nail notification reference link