Commit b2b5577d authored by 赵凯's avatar 赵凯 💬

fix

parent 3ec6d973
......@@ -4,9 +4,9 @@ from common.token import getToken
# 拉取git提交节点
def getGits(projectid, env):
def getGits(projectid, env, ref):
cookie = getToken()
url = f'https://gw.qimai.shop/api/jenkins/jenkinsjob/git/?projectid={projectid}&env={env}&page=1&keyword={env}'
url = f'https://gw.qimai.shop/api/jenkins/jenkinsjob/git/?projectid={projectid}&env={env}&page=1&keyword={ref}'
payload={}
headers = {
'authority': 'gw.qimai.shop',
......
......@@ -41,13 +41,13 @@ def checkProjIdGetResult(job):
# 获取当前项目,当前环境最新commitid
def checkCommitid(projectid, env, ref):
rst_data = getGits(projectid, env)
# 若是test, beta环境部署, 指定部署分支
# pre环境,则取指定的部署分支
if env in ['test', 'beta']:
ref = env
rst_data = getGits(projectid, env, ref)
for data in rst_data:
# test;beta 环境最新节点拉取
if data['name'] == ref:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment