forked from luoyunchong/lin-cms-dotnetcore
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
58 lines (50 loc) · 3.48 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
dockerId: [email protected]
namespace: igeekfan
identityserver4imageName: lincms-identityserver4
webimageName: lincms-web
registry: registry.cn-hangzhou.aliyuncs.com
identityserver4dockerfilepath: identityserver4/LinCms.IdentityServer4/Dockerfile
linCmsWebdockerfilepath: src/LinCms.Web/Dockerfile
steps:
- task: CmdLine@2
inputs:
script: |
echo read to execute command
ls
sed -i 's/{ConnectionStrings.DefaultDB}/$(ConnectionStrings.DefaultDB)/g' identityserver4/LinCms.IdentityServer4/appsettings.Production.json
sed -i 's/{ConnectionStrings.MySql}/$(ConnectionStrings.MySql)/g' identityserver4/LinCms.IdentityServer4/appsettings.Production.json
sed -i 's/{Certificates.Password}/$(Certificates.Password)/g' identityserver4/LinCms.IdentityServer4/appsettings.Production.json
sed -i 's/{ConnectionStrings.DefaultDB}/$(ConnectionStrings.DefaultDB)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{ConnectionStrings.MySql}/$(ConnectionStrings.MySql)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{ConnectionStrings.CsRedis}/$(ConnectionStrings.CsRedis)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{Authentication.GitHub.ClientId}/$(Authentication.GitHub.ClientId)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{Authentication.GitHub.ClientSecret}/$(Authentication.GitHub.ClientSecret)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{Authentication.QQ.ClientId}/$(Authentication.QQ.ClientId)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{Authentication.QQ.ClientSecret}/$(Authentication.QQ.ClientSecret)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{Authentication.Gitee.ClientId}/$(Authentication.Gitee.ClientId)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{Authentication.Gitee.ClientSecret}/$(Authentication.Gitee.ClientSecret)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{IdentityServer.Authority}/$(IdentityServer.Authority)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{CAP.RabbitMQ.HostName}/$(CAP.RabbitMQ.HostName)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{CAP.RabbitMQ.UserName}/$(CAP.RabbitMQ.UserName)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{CAP.RabbitMQ.Password}/$(CAP.RabbitMQ.Password)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{CAP.RabbitMQ.VirtualHost}/$(CAP.RabbitMQ.VirtualHost)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{FileStorage.Qiniu.AK}/$(FileStorage.Qiniu.AK)/g' src/LinCms.Web/appsettings.Production.json
sed -i 's/{FileStorage.Qiniu.SK}/$(FileStorage.Qiniu.SK)/g' src/LinCms.Web/appsettings.Production.json
echo command executed
- script: |
docker build -f $(identityserver4dockerfilepath) -t $(identityserver4imageName) .
docker login -u $(dockerId) -p $(pwd) $(registry)
docker tag $(identityserver4imageName) $(registry)/$(namespace)/$(identityserver4imageName)
docker push $(registry)/$(namespace)/$(identityserver4imageName)
displayName: push to lincms-identityserver4
- script: |
docker build -f $(linCmsWebdockerfilepath) -t $(webimageName) .
docker login -u $(dockerId) -p $(pwd) $(registry)
docker tag $(webimageName) $(registry)/$(namespace)/$(webimageName)
docker push $(registry)/$(namespace)/$(webimageName)
displayName: push to lincms-web