forked from CloudGeniuses/CloudGenius
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipeline.yaml
74 lines (65 loc) · 1.96 KB
/
azure-pipeline.yaml
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
trigger:
- '*'
variables:
buildConfiguration: 'Release'
stages:
- stage: 'Build'
displayName: 'Build the web application'
jobs:
- job: 'Build'
displayName: 'Build job'
pool:
vmImage: 'windows-latest'
demands:
- npm
variables:
wwwrootDir: 'C:\Users\Isaac\OneDrive\Desktop\CloudGenius\WebApplicationbyCloudGenius\WebApplicationbyCloudGenius\wwwroot'
dotnetSdkVersion: '6.x'
steps:
- task: UseDotNet@2
displayName: 'Use .NET SDK $(dotnetSdkVersion)'
inputs:
version: '$(dotnetSdkVersion)'
- task: DotNetCoreCLI@2
displayName: 'Restore project dependencies'
inputs:
command: 'restore'
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Build the project - $(buildConfiguration)'
inputs:
command: 'build'
arguments: '--no-restore --configuration $(buildConfiguration)'
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: 'Publish the project - $(buildConfiguration)'
inputs:
command: 'publish'
projects: '**/*.csproj'
publishWebProjects: false
arguments: '--no-build --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/$(buildConfiguration)'
zipAfterPublish: true
- publish: '$(Build.ArtifactStagingDirectory)'
artifact: drop
- stage: 'Deploy'
displayName: 'Deploy the web application'
dependsOn: Build
jobs:
- deployment: Deploy
pool:
vmImage: 'windows-latest'
environment: dev
variables:
- group: Release
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: drop
- task: AzureWebApp@1
displayName: 'Azure App Service Deploy: website'
inputs:
azureSubscription: 'Service'
appName: 'netcg-cg'
package: '$(Pipeline.Workspace)/drop/$(buildConfiguration)/*.zip'