[Python] Use jenkins to execute python scripts regularly

Tip: After the article is written, the table of contents can be automatically generated. How to generate it can refer to the help document on the right


foreword

提示:这里可以添加本文要记录的大概内容:

This article mainly introduces how to use jenkins to execute python scripts regularly. The prerequisite is that the python scripts have been written and the jenkins environment has been built.


提示:以下是本篇文章正文内容,下面案例可供参考

1. Steps to use

1. Log in to jenkins and create a new Freestyle task.

First enter the task name, then select the [Freestyle project] type, and finally click [OK] to complete the task creation.
task creation

2. Enter the task configuration interface, set triggers, and set build steps.

Switch to the build trigger interface, check [Build periodically], and set the time in the schedule (see the help for the specific time setting method). After the trigger is built, switch to the [Build Steps] interface and set the python to be executed Script, first click to add a build step, select 'Execute Windows batch command', and enter the script to execute the command.
build trigger
Enter the script to execute the command

3. Execute the task and check the task execution status.

Click [Build Now] to execute the jenkins task immediately, click this build in the build history bar, and then click [Console Output] to view the task build result.View build results

Summarize

This article mainly introduces the use of jenkins to execute python regularly.

Guess you like

Origin blog.csdn.net/liaotianyin/article/details/130483699