一、配置内容安全策略(配置一次):html
1.一、构建一个自由风格的软件项目 1.二、Build Triggers:Build when job nodes start 1.三、Build:Execute system Groovy script 1.3.一、Groovy Script:System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") 1.四、保存,点击当即构建运行一次,之后每次重启 Jenkins 会自动运行
二、自动化测试运行node
2.一、构建一个自由风格的软件项目 2.二、Source Code Management:Subversion/git 2.2.一、Repository URL:http://111.111.111.111:81/svn/autotest_web_ui 2.2.二、Credentials:添加用户名与密码 2.2.三、Check-out Strategy:Always check out a fresh copy 2.三、Build Triggers:定时构建 2.3.一、Schedule:分 时 日 月 星期 H H(21-23) * * * 2.四、Build Environment:Delete workspace before build starts 2.五、Build:执行 shell 2.5.一、Command:(python3 须要使用绝对路径:which python3) cd ${WORKSPACE} /usr/local/bin/python3 run.py 2.六、Post-build Actions: 2.6.一、Publish HTML reports 2.6.1.一、HTML directory to archive:${WORKSPACE}/report 2.6.1.二、Index page[s]:test.html 2.6.1.三、Report title:自动化测试报告 2.6.1.四、勾选:Keep past HTML reports 2.6.二、归档成品 2.6.2.一、Files to archive:** 2.七、集成发送构建信息至钉钉: 2.7一、添加 Jenkins URL 2.7二、添加钉钉群机器人token