我用Python编写了一个脚本,其中通过cli启动了一个Jenkins构建:
import subprocess
command = "curl -s -X POST http://<user>:<token>@<server>/build"
subprocess.Popen(command)
我需要找到一种方法来检查构建状态,如下所示:
If not started : Wait to start
If started : on progress
If ended : Success / Failure
通过执行以下操作:
while True:
# Check the status of the build
# ... <----- I don't know what to do here
if STATUS == "on progress"
break
感谢您的建议
发布于 2019-05-30 09:19:59
https://stackoverflow.com/questions/56369075
复制相似问题