jenkins 集成python脚本

第一步:创建远程仓库

第二步:本地仓库: --本地文件上传到远程仓库

git init 
git add .
git commit -m "first commit"
git remote add origin https://gitee.com/sophiachen870729/huace.git
git push -u origin "master"

第三步:jenkins创建item,选择远程仓库

  

 

 第四步:

jenkins的按照目录下安装python虚拟环境,

python3 -m venv myvenv

myvenv\Scripts\activate

pip install requirements.txt(pip freeze >requirements.txt)安装包

python main.py  运行项目

 

posted @ 2022-08-01 15:07  SophiaChen  阅读(22)  评论(0)    收藏  举报