docker部署的jenkins跑git上的程序

1、首先是关联git遇到报错:ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this

这是因为我不是跑git的master分支代码,所以报错。具体可参考这篇文章

解决就是把指定分支按照下图的设置,就是代表any分支的意思。

这样就会把git上的代码clone到jenkins容器目录当工程下,我这里为:/var/jenkins_home/workspace/first_python/

2、设置执行shell运行程序

2、保存构建执行后就可以在控制台输出看到执行结果了。

未解决的问题:

如何用pytest执行pytest用例。

猜你喜欢

转载自blog.csdn.net/chuancheng_zeng/article/details/109609996