-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
73 lines (61 loc) · 2.28 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
trigger:
- main
pool:
vmImage: "windows-latest"
name: $(Build.Reason)_commit-$(Build.SourceVersion)_$(Date:yyyyMMdd_HHmmss)
variables:
solution: "**/*.sln"
buildPlatform: "Any CPU"
buildConfiguration: "Release"
semVerDate: $(Get-Date -Format yyyyMMdd+HHmmss)
srcDirectory: "$(System.DefaultWorkingDirectory)/src"
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: Restore NuGet packages
inputs:
command: "restore"
restoreSolution: "**/*.sln"
feedsToUse: "select"
- task: PowerShell@2
displayName: Update CSPROJ Files
inputs:
filePath: "$(System.DefaultWorkingDirectory)/ci/update-csproj-versions.ps1"
arguments: '-SrcDirectory $(System.DefaultWorkingDirectory) -BuildId $(Build.BuildId) -InformationalVersionSuffix "$(semVerDate)"'
- task: PowerShell@2
displayName: Update Build Number From Version
inputs:
filePath: "$(System.DefaultWorkingDirectory)/ci/update-build-number-from-version.ps1"
arguments: "-PathToCsprojFile $(srcDirectory)/FluentTimeSeries/FluentTimeSeries.csproj"
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: "test"
projects: "**/*Tests.csproj"
testRunTitle: "Unit Tests"
arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage"'
publishTestResults: true
- task: DotNetCoreCLI@2
displayName: Build Solution and create NuGet package
inputs:
command: "pack"
packagesToPack: "$(srcDirectory)/FluentTimeSeries/FluentTimeSeries.csproj"
versioningScheme: "off"
packDirectory: $(srcDirectory)/FluentTimeSeries/bin/$(buildConfiguration)
# Publish code coverage report to the pipeline
- task: PublishCodeCoverageResults@1
displayName: "Publish code coverage"
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Agent.TempDirectory)/*/coverage.cobertura.xml
- task: CopyFiles@2
displayName: Copy Bin To ArtifactsStagingDirectory
inputs:
SourceFolder: "$(srcDirectory)/FluentTimeSeries/bin/$(buildConfiguration)"
Contents: "**"
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
ArtifactName: "drop"
publishLocation: "Container"