001_CI.sh 847 Bytes
Newer Older
据说甜蜜呢 committed
1 2 3 4 5
#!/bin/bash

set -e

# Import external functions
据说甜蜜呢 committed
6
chmod +x ./devops/PipeLines/Functions.sh
据说甜蜜呢 committed
7
source ./devops/PipeLines/Functions.sh
据说甜蜜呢 committed
8 9

GetAppName appName
据说甜蜜呢 committed
10
echo ""
据说甜蜜呢 committed
11 12
echo "Continuous integration for ${appName} starting..."

据说甜蜜呢 committed
13 14
echo ""
echo "${appName} building..."
15
GetSolutionName solutionName
据说甜蜜呢 committed
16 17
dotnet build ${solutionName}	 

据说甜蜜呢 committed
18
echo ""
据说甜蜜呢 committed
19 20
echo "Please check the version of each microservice carefully !!!"

21
GetVersion version
据说甜蜜呢 committed
22
GetImageUserName registryUserName
据说甜蜜呢 committed
23 24 25 26 27 28

declare publishOutputDir=./publish

rm -fr ${publishOutputDir}
mkdir -p ${publishOutputDir}

据说甜蜜呢 committed
29
GetServices services
据说甜蜜呢 committed
30 31
for service in ${services}
do
32 33
	IsPublishableOf ${service} isPublishable
	GetServiceName "${service}" serviceName
据说甜蜜呢 committed
34
	CI "${serviceName}" "./src/${service}/${serviceName}/${serviceName}.csproj" ${publishOutputDir}
据说甜蜜呢 committed
35 36 37 38
done

echo ""
echo "Continuous integration for ${appName} has been successful."