Commit 55fa39cc by 李二毛

Merge branch 'development' into 'rel/major'

Development

See merge request liermao/microservice-autodevopspipelines!58
parents 16a4c227 f1bb9c03
Pipeline #4202 failed with stages
in 1 second
......@@ -34,9 +34,7 @@ staging-major_job:
prod-major_job:
stage: prod-release-major
script:
- export RegistryHost='dockerhub.geekbuying.com:8100'
- export Environment='Production'
- export K8sApiServer='https://10.76.134.3:6443'
# 001 Continuous integration image to registry.
- bash ./devops/PipeLines/Creation/001_CI.sh
......@@ -48,10 +46,8 @@ prod-major_job:
- bash ./devops/PipeLines/Creation/003_ReleaseMajor.sh
# 004 Create gateway route.
- export KongApiServer='http://10.76.134.4:81'
- export KongRouteDomain='s.geekbuying.com'
- bash ./devops/PipeLines/Creation/Gateways/Kong/004_CreateGatewayRoute.sh
only:
- rel/major
tags:
- staging
\ No newline at end of file
- production
\ No newline at end of file
<Project>
<PropertyGroup>
<ServiceUrl></ServiceUrl>
</PropertyGroup>
</Project>
......@@ -3,8 +3,8 @@
set -e
# Import external functions
chmod +x ./devops/PipeLines/Functions.core.sh
source ./devops/PipeLines/Functions.core.sh
chmod +x ./devops/PipeLines/Functions.common.sh
source ./devops/PipeLines/Functions.common.sh
GetSolutionName SolutionName
......
......@@ -78,13 +78,14 @@ do
Replace ${serviceName} '.' '-' serviceName
ToLower "${serviceName}-${releaseVersion}" serviceNameWithVersion
ToLower "${serviceName}.${fdnOfK8s}" serviceFdn
ToLower ${servicePrefix} prefix
ToLower "http://${serviceFdn}/api/${prefix}" serviceUrl
echo "Begin creating service[${serviceNameWithVersion}]"
createService ${kongServiceBaseUrl} ${maxConnectTime} ${maxTime} ${retryCount} ${serviceNameWithVersion} ${serviceUrl}
echo "Begin creating route of service[${serviceNameWithVersion}]"
ToLower "/api/${releaseVersion}/${servicePrefix}" serviceRouteUrl
ToLower "/api/${releaseVersion}/${prefix}" serviceRouteUrl
createRoute ${kongRouteBaseUrl} ${maxConnectTime} ${maxTime} ${retryCount} ${serviceNameWithVersion} ${serviceRouteUrl} true
done
......
#!/bin/bash
set -e
function ToLower()
{
declare input=$1
declare output=($(echo "${input}" | tr 'A-Z' 'a-z'))
eval $2=${output}
}
function Replace()
{
declare input=$1
declare sourceExpr=$2
declare targetExpr=$3
declare output=${input//${sourceExpr}/${targetExpr}}
eval $4=${output}
}
\ No newline at end of file
......@@ -2,21 +2,9 @@
set -e
function ToLower()
{
declare input=$1
declare output=($(echo "${input}" | tr 'A-Z' 'a-z'))
eval $2=${output}
}
function Replace()
{
declare input=$1
declare sourceExpr=$2
declare targetExpr=$3
declare output=${input//${sourceExpr}/${targetExpr}}
eval $4=${output}
}
# Import external functions
chmod +x ./devops/PipeLines/Functions.common.sh
source ./devops/PipeLines/Functions.common.sh
# function GetServices()
# {
......
using System;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Basket.API.Controllers
{
[Route("api/[controller]")]
[Route("[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
......
using System;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Catalog.API.Controllers
{
[Route("api/[controller]")]
[Route("[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
......
using System;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Identity.API.Controllers
{
[Route("api/[controller]")]
[Route("[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
......
using System;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Marketing.API.Controllers
{
[Route("api/[controller]")]
[Route("[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
......
using System;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Ordering.API.Controllers
{
[Route("api/[controller]")]
[Route("[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
......
using System;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace Payment.API.Controllers
{
[Route("api/[controller]")]
[Route("[controller]")]
[ApiController]
public class ValuesController : ControllerBase
{
......
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