Commit 67ff337a by 据说甜蜜呢

修改CI方法

parent a520ecda
Pipeline #4119 passed with stage
in 18 seconds
......@@ -18,9 +18,6 @@ dotnet build ${solutionName}
echo ""
echo "Please check the version of each microservice carefully !!!"
GetVersion version
GetImageUserName registryUserName
declare publishOutputDir=./publish
rm -fr ${publishOutputDir}
......
......@@ -93,23 +93,22 @@ function IsPublishableOf()
function CI()
{
declare serviceName=$1
declare publishFile=$2
declare publishOutputDir=s2
GetVersion version
GetImageUserName registryUserName
# repository name must be lowercase
ToLower ${RegistryHost} RegistryHost
ToLower ${registryUserName} registryUserName
ToLower ${imagename} imagename
declare imagefullname="${RegistryHost}/${registryUserName}/${imagename}:${version}"
ToLower "${RegistryHost}/${registryUserName}/${serviceName}:${version}" imagefullname
echo ""
echo "begin delivery for ${imagename}..."
mkdir -p ${publishOutputDir}/${imagename}
dotnet publish ${publishFile} -o ../../publish/${imagename} -c release --no-restore
docker build -t ${imagefullname} ${publishOutputDir}/${imagename}
echo "begin delivery for ${serviceName}:${version}..."
mkdir -p ${publishOutputDir}/${serviceName}
dotnet publish ${publishFile} -o ../../publish/${serviceName} -c release --no-restore
docker build -t ${imagefullname} ${publishOutputDir}/${serviceName}
docker push ${imagefullname}
rm -fr ${publishOutputDir}/${imagename}
echo "delivery for ${imagename}:${version} has been successful."
rm -fr ${publishOutputDir}/${serviceName}
echo "delivery for ${serviceName}:${version} 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