-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
77 lines (67 loc) · 2.13 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
name: 4.17.0$(Rev:.r)
trigger:
- main
pool:
vmImage: 'windows-latest'
variables:
solution: '**/Mvp.Selections.Api.csproj'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: Assembly-Info-NetCore@3
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: '**/*.csproj'
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
Authors: 'sc-ivanlieckens'
Company: 'Sitecore'
Product: 'Sitecore MVP Selections API'
Copyright: 'Copyright (c) Sitecore 2022'
PackageLicenseExpression: 'MIT'
RepositoryUrl: 'https://github.com/Sitecore/Mvp.Selections.Api'
RepositoryType: 'git'
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
InformationalVersion: '$(Build.BuildNumber)'
PackageVersion: '$(Build.BuildNumber)'
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: true
- script: |
dotnet restore
dotnet build --configuration $(buildConfiguration)
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*.Tests.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
command: publish
arguments: '--configuration $(buildConfiguration) --output publish_output'
projects: '$(Solution)'
publishWebProjects: false
modifyOutputPath: false
zipAfterPublish: false
- task: ArchiveFiles@2
displayName: "Archive files"
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/publish_output"
includeRootFolder: false
archiveFile: "$(Build.ArtifactStagingDirectory)/build$(Build.BuildId).zip"
- task: PublishBuildArtifacts@1
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'MVPSelectionsAPI'
publishLocation: 'Container'