Commit c48473e1 by 李二毛

Merge branch 'development' into 'rel/major'

Development

See merge request liermao/microservice-autodevopspipelines!34
parents 83143c0d 40f164c3
Pipeline #4135 failed with stages
in 16 seconds
......@@ -3,8 +3,8 @@
set -e
# Import external functions
chmod +x ./devops/PipeLines/Functions.sh
source ./devops/PipeLines/Functions.sh
chmod +x ./devops/PipeLines/Functions.deploy.sh
source ./devops/PipeLines/Functions.deploy.sh
GetAppName appName
echo ""
......@@ -18,8 +18,8 @@ dotnet build ${solutionName}
echo ""
echo "Please check the version of each microservice carefully !!!"
GetServices services
for servicePrefix in ${services}
#GetServices services
for servicePrefix in `ls ./src/Services|xargs -d '/'`
do
GetServiceName ${servicePrefix} serviceName
GetServiceCsProjFile ${servicePrefix} ${serviceName} serviceCsProjFile
......
......@@ -11,8 +11,7 @@ function ToLower()
function GetServices()
{
declare svcs=($(ls ./src/Services|xargs -d '/' echo))
eval $1="${svcs}"
# eval $1=`ls ./src/Services|xargs -d '/'`
}
function GetServiceCsProjFile()
......@@ -89,27 +88,4 @@ function IsPublishableOf()
declare prefix=$0
declare isP=($(grep -oP "(?<=${prefix}Publishable>)[^<]+" "/tmp/cicd.props"))
eval $1=isP
}
function CI()
{
declare serviceName=$1
declare publishFile=$2
declare publishOutputDir="/tmp/${serviceName}"
GetVersion version
GetImageUserName registryUserName
# repository name must be lowercase
ToLower "${RegistryHost}/${registryUserName}/${serviceName}:${version}" imagefullname
echo ""
echo "Begin delivering for ${serviceName}..."
echo "Tips: Image full name: ${imagefullname}"
mkdir -p ${publishOutputDir}
dotnet publish ${publishFile} -o ${publishOutputDir} -c release --no-restore
docker build -t ${imagefullname} ${publishOutputDir}
docker push ${imagefullname}
rm -fr ${publishOutputDir}
echo "Delivery for ${serviceName} has been successful."
}
\ No newline at end of file
#!/bin/bash
set -e
# Import external functions
chmod +x ./devops/PipeLines/Functions.core.sh
source ./devops/PipeLines/Functions.core.sh
function CI()
{
declare serviceName=$1
declare publishFile=$2
declare publishOutputDir="/tmp/${serviceName}"
GetVersion version
GetImageUserName registryUserName
# repository name must be lowercase
ToLower "${RegistryHost}/${registryUserName}/${serviceName}:${version}" imagefullname
echo ""
echo "Begin delivering for ${serviceName}..."
echo "Tips: Image full name: ${imagefullname}"
mkdir -p ${publishOutputDir}
dotnet publish ${publishFile} -o ${publishOutputDir} -c release --no-restore
docker build -t ${imagefullname} ${publishOutputDir}
docker push ${imagefullname}
rm -fr ${publishOutputDir}
echo "Delivery for ${serviceName} has been successful."
}
\ No newline at end of file
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