Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-deploy-utils
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
qa-deploy-utils
Commits
2d4bb462
Commit
2d4bb462
authored
Jul 10, 2017
by
tywldx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new
parent
c91cc6b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
get_project_config.js
qa_shell_script/config_server/get_project_config.js
+23
-1
make_frp_ini.sh
qa_shell_script/ngrok/make_frp_ini.sh
+46
-0
No files found.
qa_shell_script/config_server/get_project_config.js
View file @
2d4bb462
...
...
@@ -166,6 +166,21 @@ configFunction.prototype = {
}
}
},
getProjectsAttrs
:
function
(
projects
,
attr
)
{
var
attrs
=
attr
.
split
(
"
/
"
);
if
(
attrs
.
length
==
0
){
return
}
var
list
=
[];
for
(
var
i
=
0
;
i
<
projects
.
length
;
i
++
)
{
var
li
=
[
projects
[
i
][
"
name
"
]];
for
(
var
j
=
0
;
j
<
attrs
.
length
;
j
++
){
li
.
push
(
projects
[
i
][
attrs
[
j
]]);
}
list
.
push
(
li
.
join
(
"
|
"
));
}
return
list
.
join
(
"
"
);
},
getProjectsAttr
:
function
(
type
,
attr
)
{
switch
(
type
)
{
case
"
java
"
:
...
...
@@ -187,6 +202,13 @@ var F = new configFunction();
if
(
param
[
"
type
"
]
==
""
)
{
F
.
getProjectAttr
(
param
[
"
name
"
],
param
[
"
attr
"
]);
}
else
{
}
else
if
(
param
[
"
type
"
]
==
"
multi
"
){
var
str
=
""
;
str
+=
F
.
getProjectsAttrs
(
java_projects
,
param
[
"
attr
"
]);
str
+=
"
"
+
F
.
getProjectsAttrs
(
ui_projects
,
param
[
"
attr
"
]);
str
+=
"
"
+
F
.
getProjectsAttrs
(
python_projects
,
param
[
"
attr
"
]);
str
+=
"
"
+
F
.
getProjectsAttrs
(
node_projects
,
param
[
"
attr
"
]);
console
.
log
(
str
)
}
else
{
F
.
getProjectsAttr
(
param
[
"
type
"
],
param
[
"
attr
"
]);
}
qa_shell_script/ngrok/make_frp_ini.sh
0 → 100755
View file @
2d4bb462
#!/bin/bash
pwd_path
=
"/home/qa-deploy-utils/qa_shell_script"
config_shell_path
=
"
$pwd_path
"
config_server
=
"
$pwd_path
/config_server"
filename
=
/home/quant_group/frp_0.12.0_linux_amd64/frpc_custom.ini
IP_host_first
=
"192.168.4."
ips
=
`
cat
$config_server
/get_env_ip.sh
`
function
addFileHead
()
{
rm
-rf
$1
echo
"[common]"
>>
$1
echo
"server_addr = 127.0.0.1"
>>
$1
echo
"server_port = 7000"
>>
$1
echo
"privilege_token = 12345678"
>>
$1
echo
" "
>>
$1
}
addFileHead
$filename
function
addFile
()
{
echo
"[web
$2
-
$1
]"
>>
$4
echo
"type = http"
>>
$4
echo
"local_ip = 192.168.4.
$2
"
>>
$4
echo
"local_port =
$3
"
>>
$4
echo
"subdomain =
$2
-
$1
"
>>
$4
}
projectAndPort
=
`
node
$config_server
/get_project_config.js
-name
$project
-attr
port
`
for
ip_last
in
${
ips
[@]
}
do
for
projectAndPort
in
${
projectAndPort
[@]
}
do
arr
=
$(
echo
$projectAndPort
|tr
"|"
"
\n
"
)
port
=
$arr
[
1]
project
=
$arr
[
0]
addFile
$ip_last
$arr
[
0]
$arr
[
1]
$filename
done
done
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