-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
60 lines (52 loc) · 1.69 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
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
notesApiProject: 'Notes.Api/Notes.Api.csproj'
notesApiTestProject: 'Notes.Api.Test/Notes.Api.Test.csproj'
steps:
# .NET Core 3.1 isn't currently installed by default on hosted build agents
# Start off by installing it manually
- task: UseDotNet@2
displayName: 'Use .NET Core 3.1'
inputs:
packageType: sdk
version: 3.1.100
installationPath: $(Agent.ToolsDirectory)/dotnet
# Test and publish .NET Core projects
- task: DotNetCoreCLI@2
displayName: 'Test Notes.Api'
inputs:
command: test
projects: $(notesApiTestProject)
arguments: '--configuration Release'
- task: DotNetCoreCLI@2
displayName: 'Publish Notes.Api'
inputs:
command: publish
publishWebProjects: false
projects: $(notesApiProject)
arguments: '--configuration Release --output Notes.Api.Publish'
zipAfterPublish: false
modifyOutputPath: true
# Publish build artifacts
# Only performed on builds from master-branch
- task: PublishBuildArtifacts@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: 'Publish Notes.Api.Artifacts'
inputs:
PathToPublish: Notes.Api.Publish
ArtifactName: Notes.Api.Artifacts
- task: PublishBuildArtifacts@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: 'Publish Notes.Client.Artifacts'
inputs:
PathToPublish: Notes.Client
ArtifactName: Notes.Client.Artifacts
- task: PublishBuildArtifacts@1
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
displayName: 'Publish Notes.Api.Test.Postman'
inputs:
PathToPublish: Notes.Api.Test.Postman
ArtifactName: Notes.Api.Test.Postman.Artifacts