Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
config_repository
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
config_repository
Commits
5109e3b3
Commit
5109e3b3
authored
Nov 17, 2018
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
替换静态文件
parent
1736fbbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
replace.py
yaml/replace.py
+3
-0
replace_config.yaml
yaml/replace_config.yaml
+8
-1
No files found.
yaml/replace.py
View file @
5109e3b3
...
@@ -50,6 +50,9 @@ for file in files:
...
@@ -50,6 +50,9 @@ for file in files:
if
rule
.
get
(
'useNamespace'
,
None
)
and
rule
[
'to'
]:
if
rule
.
get
(
'useNamespace'
,
None
)
and
rule
[
'to'
]:
rule
[
'to'
]
=
'-'
+
namespace
+
rule
[
'to'
]
rule
[
'to'
]
=
'-'
+
namespace
+
rule
[
'to'
]
if
rule
.
get
(
'useSystemName'
,
None
)
and
rule
[
'reg'
]:
rule
[
'reg'
]
=
rule
[
'reg'
]
+
'/'
+
project
+
'/public'
if
rule
[
'reg'
]:
if
rule
[
'reg'
]:
p
=
re
.
compile
(
r''
+
rule
[
'reg'
])
p
=
re
.
compile
(
r''
+
rule
[
'reg'
])
line
=
re
.
sub
(
p
,
rule
[
'to'
],
line
)
line
=
re
.
sub
(
p
,
rule
[
'to'
],
line
)
...
...
yaml/replace_config.yaml
View file @
5109e3b3
# reg: 匹配的正则
# reg: 匹配的正则
# to: 正则匹配后替换需要的值
# to: 正则匹配后替换需要的值
# useNamespace: 是否在替换的值前追加 '-[namespace名称]'
# useNamespace: 是否在替换的值前追加 '-[namespace名称]'
# useSystemName: 项目名称
lkbDomain
:
&lkbDomain
'
.liangkebang.com'
lkbDomain
:
&lkbDomain
'
.liangkebang.com'
...
@@ -35,10 +36,16 @@ h5AuthRule: &h5AuthRule
...
@@ -35,10 +36,16 @@ h5AuthRule: &h5AuthRule
reg
:
'
h5.auth.quantgroup.cn'
reg
:
'
h5.auth.quantgroup.cn'
to
:
'
operator.liangkebang.com'
to
:
'
operator.liangkebang.com'
staticRule
:
&staticRule
reg
:
'
static.q-gp.com'
to
:
'
'
useSystemName
:
true
common
:
&common
common
:
&common
xyqbApiRule
:
*xyqbApiRule
xyqbApiRule
:
*xyqbApiRule
quantgroupApiRule
:
*quantgroupApiRule
quantgroupApiRule
:
*quantgroupApiRule
xyqbCookieRule
:
*xyqbCookieRule
xyqbCookieRule
:
*xyqbCookieRule
# xyqbApiDomainRule: *xyqbApiDomainRule
# xyqbApiDomainRule: *xyqbApiDomainRule
qgApiRule
:
*qgApiRule
qgApiRule
:
*qgApiRule
qgCookieRule
:
*qgCookieRule
qgCookieRule
:
*qgCookieRule
\ No newline at end of file
staticRule
:
*staticRule
\ No newline at end of file
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