forked from fiskaltrust/middleware-interface-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
86 lines (72 loc) · 2.46 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
78
79
80
81
82
83
84
85
86
resources:
- repo: self
trigger:
batch: true
branches:
include:
- master
- refs/tags/*
pr:
- master
variables:
- group: 'Code Signing Certificates'
- name: BuildConfiguration
value: release
- name: BuildPlatform
value: any cpu
- name: Solution
value: 'fiskaltrust.Middleware.Interface.sln'
jobs:
- job: Build
pool:
vmImage: windows-latest
steps:
- task: VisualStudioTestPlatformInstaller@1
displayName: VsTest Platform Installer
- task: yavt@1
inputs:
mode: 'Multi'
semverVersion: 'v1'
- powershell: |
$nugetFeed = if ($Env:BUILD_SOURCEBRANCH.StartsWith("refs/heads/release/") -or $Env:BUILD_SOURCEBRANCH.StartsWith("refs/tags/v")) { "release" } else { "dev" }
Write-Host "##vso[task.setvariable variable=NuGetFeed;]$nugetFeed"
displayName: Set NuGet feed
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '**/*.csproj'
vstsFeed: $(NuGetFeed)
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(Solution)'
arguments: '--configuration $(BuildConfiguration)'
- task: codesigning@2
displayName: 'Code Signing '
inputs:
secureFileId: 'codesigning.pfx'
signCertPassword: '$(Code_Signing_Password)'
filePaths: |
**/*.dll
**/*.exe
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResults.xml
displayName: 'dotnet test ifPOS'
workingDirectory: 'test\fiskaltrust.ifPOS.Tests'
- script: dotnet test --no-build --configuration $(buildConfiguration) --test-adapter-path:. --logger:nunit;LogFilePath=TestResults.xml
displayName: 'dotnet test Clients'
workingDirectory: 'test\fiskaltrust.Middleware.Interface.Client.Tests'
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: NUnit
testResultsFiles: '**/*TestResults*.xml'
mergeTestResults: true
failTaskOnFailedTests: true
buildConfiguration: $(buildConfiguration)
- script: dotnet pack --no-build --output $(Build.ArtifactStagingDirectory) --configuration $(buildConfiguration)
displayName: 'dotnet pack ifPOS'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'