当前位置:网站首页>Jenkins' common build trigger and hook services (V)
Jenkins' common build trigger and hook services (V)
2022-06-28 08:01:00 【m0_ fifty-nine million four hundred and thirty thousand one hun】
List of articles
One 、Jenkins built-in 4 Build triggers :
- Trigger remote build
- Trigger after other projects are built (Build after other projects are build)
- Time to build (Build periodically)
- polling SCM(Poll SCM)
1. Trigger remote build
The website path that triggers the construction is url:http://192.168.74.8:8888/job/web_demo_pipeline/build?token=8888
Format :
jenkins website + The path of replication ( hold TOKEN_NAME Change to the authentication token you entered )
2. Trigger after other projects are built
First create a free build project
Configure in the previous project
Build the pre project of the configuration after saving
After the pre project is built , The configured project has also started to build
3. Time to build
Enter the project configuration and click Build periodically
Some examples of timed expressions :
Every time 30 Build once in minutes :H On behalf of the parameter H/30 * * * * 10:02 10:32
Every time 2 Build once an hour : H H/2 * * *
Daily 8 spot ,12 spot ,22 spot , Build... In a day 3 Time : ( Multiple time points are separated by commas ) 0 8,12,22 * * *
Every day at noon 12 Build once on a regular basis H 12 * * *
Every afternoon 18 Build once on a regular basis H 18 * * *
Every... In the first half of every hour 10 minute H(0-29)/10 * * * *
Every two hours , Every weekday in the morning 9 Point to the afternoon 5 spot ( Maybe in the morning 10:38, Afternoon 12:38, Afternoon 2:38, Afternoon
4:38) H H(9-16)/2 * * 1-5
Every time 2 Minutes to start automatic build
4. polling SCM
polling SCM, When specified, scan the local code warehouse for code changes , If the code changes, the project build is triggered .
The only difference between it and timed construction is , Only when the code warehouse changes , Will trigger the build , If there is no change , It doesn't trigger ,
Waiting for 2 Minutes to find out if the code doesn't change , Will not build .
Summary :
Build and poll regularly SCM The difference is that , A scheduled build does not look at changes in the code in the project , Automatically build when time comes , And polling SCM The code of the local code warehouse will be scanned for changes according to the specified time , If the code changes, the project build is triggered
Two 、Gitlab To configure webhook
1. Turn on webhook function
Gitlab On the server root Account login to the background , Click on Admin Area -> Settings -> Network Check "Allow requests to the local network from web hooks and services"
First use root Administrator login Gitlab
Switch to the current project for setting
2. Add... To the project webhook, add to webhook and Gitlab plug-in unit
Click item ->Settings->Integrations
To test
Will report a mistake
Manage Jenkins->Configure System
go back to gitlab Last time test
idea Change the development environment code and submit the code
3、 ... and 、Jenkins Parametric construction of
Sometimes in the process of building a project , We need to input some parameters dynamically according to the user's input , This will affect the results of the entire build , In this case, we can use parametric construction
Jenkins Support very rich parameter types
1. Building configuration
go back to web_demo_pipeline Remove all build trigger options from the project
After saving successfully, you will see the following effect
Next, I'll show you how to enter gitlab The branch name of the project to deploy different branch projects .
2. Project creation Branch , And push it to Gitlab On
3. see Gitlab The branch on
边栏推荐
- Section VII starting principle and configuration of zynq
- Evaluation of inverse Polish expression < difficulty coefficient >
- Ambari (VII) --- ambari integrated hue4.2 document (valid for personal test)
- HJ字符个数统计
- 券商注册开户靠谱吗?安全吗?
- 逆波兰表达式求值<难度系数>
- MySQL implements transaction persistence using redo logs
- Configuring MySQL multi instance master-slave synchronization for Linux
- Upgrade HDP spark to spark 2.4.8 without upgrading ambari
- Ice - resources
猜你喜欢
MySQL row format parsing
Unity-UI-shadow组件
Flex layout
Redis cluster deployment and application scenarios
asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
SQL Master slave Replication Build
Section 8: DMA of zynq
ACM notes
sql主从复制搭建
Upgrade HDP spark to spark 2.4.8 without upgrading ambari
随机推荐
Section 5: zynq interrupt
How to insert a single quotation mark into a table as a data type in Oracle pl/sql
Airflow2.1.1 summary of the pits stepped on in actual combat!!
MySQL two table connection principle (understand join buf)
Idea package together, using compact middle packages to solve &
Redis uses sentinel master-slave switching. What should the program do?
ROS 笔记(09)— 参数的查询和设置
Flutter realizes the function of "shake"
Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
flex布局
MySQL tablespace parsing
本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
打新债注册开户靠谱吗?安全吗?
Generation and verification of JWT token
HJ删除字符串中出现次数最少的字符
Configuring multiple instances of MySQL under Linux
nlp序列完全可以模拟人脑智能
推荐系统系列精讲(第五讲): 排序模型的调优实践
Explanation and application of instr() function in Oracle
券商注册开户靠谱吗?安全吗?