forked from HoussemDellai/WebAppWithDatabaseDemo
-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines-cegid-demo.yml
71 lines (62 loc) · 1.95 KB
/
azure-pipelines-cegid-demo.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
pr:
branches:
include:
- dev
paths:
exclude:
- docs/*
- README.md
trigger:
branches:
include:
- master
stages:
- stage: Build_Stage
displayName: Build Stage
jobs:
- job: WebApp
displayName: Build Web App
pool:
name: Hosted Windows 2019 with VS2019
vmImage: 'windows-2019'
demands: java
variables:
BuildConfiguration: release
steps:
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '**/WebApp/WebApp.csproj'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '**/WebApp/WebApp.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '**/*UnitTest*.csproj'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: True
- task: PublishBuildArtifacts@1
displayName: Publish Artifact (WebApp.zip)
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: drop
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: 'Microsoft Azure #1(1)(25a98a18-5e94-4b21-9d17-e8cf45bfd81f)'
appType: 'webAppLinux'
WebAppName: 'cegid-demo'
deployToSlotOrASE: true
ResourceGroupName: 'cegid'
SlotName: 'staging'
packageForLinux: '$(build.artifactstagingdirectory)/**/WebApp.zip'