-
-
Notifications
You must be signed in to change notification settings - Fork 207
/
azure-pipelines.yml
132 lines (112 loc) · 4.94 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
- master
- ci-cd
- releases/*
- developer
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@1
- bash: git clone --depth=50 --branch=master https://github.com/mixcore/mix.heart.git d:/a/1/mix.heart
- bash: git clone --depth=50 --branch=master https://github.com/mixcore/mix.identity.git d:/a/1/mix.identity
# # - task: UseNode@1
# # - task: CmdLine@2
# # inputs:
# # script: 'npm install'
# # workingDirectory: 'd:\a\1\s\src\portal-app\'
# # - task: Gulp@1
# # inputs:
# # gulpFile: 'd:\a\1\s\src\portal-app\gulpfile.js'
# # targets: 'build'
# # enableCodeCoverage: false
# - task: NuGetCommand@2
# inputs:
# restoreSolution: '$(solution)'
# - task: VSBuild@1
# inputs:
# solution: '$(solution)'
# msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
# platform: '$(buildPlatform)'
# configuration: '$(buildConfiguration)'
# - task: CmdLine@2
# inputs:
# script: |
# dir /a d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\
# - task: PowerShell@2
# inputs:
# targetType: 'inline'
# script: |
# (Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$SER_IP\`$", $env:DEMO_SER_IP | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
# (Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$DBNAME\`$", $env:DEMO_DBNAME | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
# (Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$DBUID\`$", $env:DEMO_DBUID | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
# (Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$DBPWD\`$", $env:DEMO_DBPWD | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
# (Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json)
# - task: VSTest@2
# inputs:
# platform: '$(buildPlatform)'
# configuration: '$(buildConfiguration)'
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
(Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$SER_IP\`$", $env:DEMO_SER_IP | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
(Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$DBNAME\`$", $env:DEMO_DBNAME | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
(Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$DBUID\`$", $env:DEMO_DBUID | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
(Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json) -replace "\`$DBPWD\`$", $env:DEMO_DBPWD | Set-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json
(Get-Content d:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\appsettings.json)
# - task: FtpUpload@1
# inputs:
# credentialsOption: 'inputs'
# serverUrl: $(ftp_url)
# username: $(ftp_username)
# password: $(ftp_pass)
# rootDirectory: 'd:\a\1\s\'
# filePatterns: 'app_offline.htm'
# remoteDirectory: '/demo/mixcore_demo'
# # - task: DeleteFiles@1
# # inputs:
# # SourceFolder: 'd:\a\1\s\'
# # Contents: 'app_offline.htm'
# - task: FtpUpload@1
# inputs:
# credentialsOption: 'inputs'
# serverUrl: $(ftp_url)
# username: $(ftp_username)
# password: $(ftp_pass)
# rootDirectory: 'd:\a\1\s\src\Mix.Cms.Web\obj\Release\netcoreapp2.2\PubTmp\Out\'
# remoteDirectory: '/demo/mixcore_demo'
# # filePatterns: |
# # */**/*.json
# # */**/*.js
# # */**/*.html
# # */**/*.htm
# # */**/*.cshtml
# # */**/*.css
# # */**/*.dll
# clean: false
# cleanContents: true
# preservePaths: true
# # clean: false
# # cleanContents: false
# # preservePaths: false
# # trustSSL: false
# # */**/*.js
# # */**/*.html
# # */**/*.htm
# # */**/*.cshtml
# # */**/*.css
# # */**/*.dll
# */**/*.js
# */**/*.html
# */**/*.htm
# */**/*.cshtml
# */**/*.css
# */**/*.dll