-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines-ChatService.yml
82 lines (72 loc) · 2.09 KB
/
azure-pipelines-ChatService.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
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
# Trigger on the main brach, and filtered to only the Chat Service
trigger:
branches:
include:
- main
paths:
include:
- src/BackEnd/XamarinSignalRChat.ChatService
exclude:
- Screenshots
- src
- Docs
- azure-pipelines.yml
- azure-pipelines-Android.yml
- azure-pipelines-ChatService.yml
- azure-pipelines-iOS.yml
- README.md
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
projectName: '**/*ChatService.csproj'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
# Install NuGet tool
- task: NuGetToolInstaller@1
# Restore NuGet packages
- task: NuGetCommand@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
restoreSolution: '$(solution)'
# Build the project
- task: DotNetCoreCLI@2
displayName: "dotnet build"
inputs:
command: 'build'
projects: '$(projectName)'
# Run any tests
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
# Publish project
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(projectName)'
configuration: '$(buildConfiguration)'
arguments: '--output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: true
# Create a drop artefact for the project
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
# Deploy to Azure, uncomment the below and add your Subscription and web app name
#- task: AzureRmWebAppDeployment@4
# displayName: 'Deploy to Azure'
# inputs:
# ConnectionType: 'AzureRM'
# azureSubscription: 'ENTER YOUR AZURE SUBSCRIPTION HERE'
# appType: 'webApp'
# WebAppName: 'ENTER YOUR AZURE APP NAME HERE'
# packageForLinux: '$(build.artifactstagingdirectory)/**/*.zip'