Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
opms-command
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
赵凯
opms-command
Commits
b2b5577d
Commit
b2b5577d
authored
Mar 26, 2024
by
赵凯
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3ec6d973
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
get_gits_api.py
apis/get_gits_api.py
+2
-2
opms.py
opms.py
+2
-2
No files found.
apis/get_gits_api.py
View file @
b2b5577d
...
@@ -4,9 +4,9 @@ from common.token import getToken
...
@@ -4,9 +4,9 @@ from common.token import getToken
# 拉取git提交节点
# 拉取git提交节点
def
getGits
(
projectid
,
env
):
def
getGits
(
projectid
,
env
,
ref
):
cookie
=
getToken
()
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
=
{}
payload
=
{}
headers
=
{
headers
=
{
'authority'
:
'gw.qimai.shop'
,
'authority'
:
'gw.qimai.shop'
,
...
...
opms.py
View file @
b2b5577d
...
@@ -41,13 +41,13 @@ def checkProjIdGetResult(job):
...
@@ -41,13 +41,13 @@ def checkProjIdGetResult(job):
# 获取当前项目,当前环境最新commitid
# 获取当前项目,当前环境最新commitid
def
checkCommitid
(
projectid
,
env
,
ref
):
def
checkCommitid
(
projectid
,
env
,
ref
):
rst_data
=
getGits
(
projectid
,
env
)
# 若是test, beta环境部署, 指定部署分支
# 若是test, beta环境部署, 指定部署分支
# pre环境,则取指定的部署分支
# pre环境,则取指定的部署分支
if
env
in
[
'test'
,
'beta'
]:
if
env
in
[
'test'
,
'beta'
]:
ref
=
env
ref
=
env
rst_data
=
getGits
(
projectid
,
env
,
ref
)
for
data
in
rst_data
:
for
data
in
rst_data
:
# test;beta 环境最新节点拉取
# test;beta 环境最新节点拉取
if
data
[
'name'
]
==
ref
:
if
data
[
'name'
]
==
ref
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment