-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
85 lines (76 loc) · 2.7 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
trigger:
- master
stages:
- stage: build
jobs:
- job: Build
pool: Personal-Docker
variables:
- group: Invisionware.Common
- group: Invisionware.IoC
- name: solution
value: '**/*.sln'
- name: buildPlatform
value: 'Any CPU'
- name: buildConfiguration
value: 'Release'
- name: buildTarget
value: 'Nuget-Package'
steps:
- task: NuGetToolInstaller@1
displayName: 'Install Nuget Tools'
- task: NuGetCommand@2
displayName: 'Restore nuget packages'
inputs:
restoreSolution: '$(solution)'
- task: replacetokens@3
displayName: 'Transform appsetings.json'
inputs:
rootDirectory: '$(Build.SourcesDirectory)/tests'
targetFiles: '**/appSettings.json'
encoding: 'auto'
writeBOM: true
escapeType: 'json'
verbosity: 'detailed'
actionOnMissing: 'warn'
keepToken: false
tokenPrefix: '#{'
tokenSuffix: '}#'
- task: Cake@0
displayName: 'Build Solution: Cake'
inputs:
script: 'build.cake'
target: '$(buildTarget)'
verbosity: 'Verbose'
arguments: '-NugetArtifactsPath=$(Build.ArtifactStagingDirectory) -configuration=$(buildConfiguration)'
- task: PublishTestResults@2
displayName: 'Unit Tests: Publish results'
enabled: true
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/tests/**/*.trx'
mergeTestResults: true
failTaskOnFailedTests: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
enabled: true
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
- stage: nuget_deploy
jobs:
- deployment: nuget_deploy
condition: and(succeeded(), eq(variables['Deploy.Nuget'], 'true'))
pool: Personal-Docker
environment: nuget
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;!$(Pipeline.Workspace)/**/*.snupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'Github Connection'