-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines-webapp.yml
46 lines (42 loc) · 1.52 KB
/
azure-pipelines-webapp.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
# Azure Pipelines for .NET Core app (Web, Function, ....) :)
# More info: https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=vsts
parameters:
Name: 'ASPNetCoreWebApp'
RestoreBuildProjects: '**/*.API.csproj'
BuildConfiguration: 'Release'
WorkingDirectory: 'Src/Backend/Contoso.CognitivePipeline.API'
PublishWebApp: True
ArtifactName: 'AppDrop'
ZipAfterPublish: True
jobs:
- job: ${{ Parameters.Name }}
pool:
vmImage: 'ubuntu-16.04'
demands: npm
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: ${{ Parameters.RestoreBuildProjects }}
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: ${{ Parameters.RestoreBuildProjects }}
arguments: '--configuration ${{ Parameters.BuildConfiguration }}'
workingDirectory: ${{ Parameters.WorkingDirectory }}
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: ${{ Parameters.PublishWebApp }}
arguments: '--configuration ${{ Parameters.BuildConfiguration }} --output $(build.artifactstagingdirectory)'
zipAfterPublish: ${{ Parameters.ZipAfterPublish }}
projects: ${{ Parameters.RestoreBuildProjects }}
workingDirectory: ${{ Parameters.WorkingDirectory }}
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: ${{ Parameters.ArtifactName }}'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: ${{ Parameters.ArtifactName }}
zipAfterPublish: True