Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
microservice-autodevopspipelines
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李春生
microservice-autodevopspipelines
Commits
b90e2f19
Commit
b90e2f19
authored
Jan 10, 2019
by
据说甜蜜呢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化脚本
parent
8409c887
Pipeline
#4193
passed with stage
in 17 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
devops/PipeLines/Creation/003_ReleaseMajor.sh
+1
-0
devops/PipeLines/Creation/Gateways/Kong/004_CreateGatewayRoute.sh
+8
-7
No files found.
devops/PipeLines/Creation/003_ReleaseMajor.sh
View file @
b90e2f19
...
...
@@ -26,6 +26,7 @@ echo ""
GetMajor major
GetReplicas replicas
GetRegistryHost RegistryHost
GetImageUserName registryUserName
ToLower
${
Environment
}
environment
ToLower
"
${
appName
}
.v
${
major
}
"
releaseName
...
...
devops/PipeLines/Creation/Gateways/Kong/004_CreateGatewayRoute.sh
View file @
b90e2f19
...
...
@@ -10,13 +10,6 @@ GetAppName appName
echo
"Start dynamically building the gateway route for
${
appName
}
..."
GetMajor major
GetNameSpace namespace
declare
fdnOfK8s
=
"
${
namespace
}
.svc.cluster.local"
declare
kongServiceBaseUrl
=
"
${
KongApiServer
}
/services"
declare
kongRouteBaseUrl
=
"
${
KongApiServer
}
/routes"
declare
releaseVersion
=
"v
${
major
}
"
# resilience handle
# Maximum time in seconds that you allow the whole operation to take.
declare
maxTime
=
5
...
...
@@ -68,12 +61,20 @@ function createRoute()
set
-e
}
GetMajor major
GetNameSpace namespace
declare
fdnOfK8s
=
"
${
namespace
}
.svc.cluster.local"
declare
kongServiceBaseUrl
=
"
${
KongApiServer
}
/services"
declare
kongRouteBaseUrl
=
"
${
KongApiServer
}
/routes"
declare
releaseVersion
=
"v
${
major
}
"
for
servicePrefix
in
`
ls
./src/Services|xargs
-d
'/'
`
do
GetServiceName
${
servicePrefix
}
serviceName
# replace . to -, compatible with k8s.
Replace
${
serviceName
}
'.'
'-'
serviceName
ToLower
"
${
serviceName
}
-
${
releaseVersion
}
"
serviceNameWithVersion
ToLower
"
${
serviceName
}
.
${
fdnOfK8s
}
"
serviceFdn
ToLower
"http://
${
serviceFdn
}
/api/
${
prefix
}
"
serviceUrl
echo
"Begin creating service[
${
serviceNameWithVersion
}
]"
...
...
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