Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The method of timing Construction and polling SCM in Jenkins

Shulou Source: shulou.com Published: 2022-06-02 04:39:18 10月02日 Update

This article mainly explains "the method of Jenkins timing construction and polling SCM". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the method of Jenkins timing construction and polling SCM".

1. Build at different times:

The scheduled build task is performed regardless of whether the code on the remote code branch (Svn/Git) is updated or not

Polling SCM:

Whenever there are any updates on the remote code branch (Svn/Git), the build task is performed.

2. Format: * *

The first * indicates minute minute: value 0-59, which minute to execute

The second * indicates hourly hour: value 0-23, which hour to execute

The third * indicates the date day: value is 1-31, which day will be executed.

The fourth * indicates month month: value is 1-12, which month will be executed.

The fifth * indicates the week week: value 0-7, which day of the week to execute

3. Example # build an OR every half hour to check the remote code branch every half hour. If there is an update, build an OR to check the remote code branch every two hours. If there is an update, build the remote code branch every two hours. If there are updates, build the remote code branch at two o'clock every morning. At 9: 00 a.m., H9 * * 1-pound 1mins will be executed every week. Starting at 8:30, until 19:30, the construction will be conducted every 4 hours and 30 minutes.

Whether to use timed build or poll SCM in the process depends on specific scenarios. The following two commonly used scenarios are listed for reference.

# build regularly at 8: 00 every day, regardless of whether the code is updated at 8 * # weekdays, and check every 30 minutes from 9 to 20:00. If there are code updates, build a scheduled build: h 8 * polling SCM:H/30 9-20 * * 1-5

After the configuration is completed, you can click apply to check whether the configuration is correct (illegal configuration will be prompted) or go to https://crontab.guru for test and verification.

Thank you for your reading. the above is the content of "the method of Jenkins timing Construction and polling SCM". After the study of this article, I believe you have a deeper understanding of the method of Jenkins timing construction and polling SCM, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Code hours updates methods branches check learning configuration tasks content scenarios working days work verification two that is commonly used ideas situations articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB NVidia Xiaomi Microsoft Linux