Skip to content

Commit

Permalink
Updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ravensorb committed Jan 7, 2020
1 parent 255c76f commit 8c2276c
Showing 1 changed file with 30 additions and 26 deletions.
56 changes: 30 additions & 26 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ pool:
vmImage: 'windows-latest'

variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
- group: Invisionware.Collections
- name: solution
value: '**/*.sln'
- name: buildPlatform
value: 'Any CPU'
- name: buildConfiguration
value: 'Release'
- name: buildTarget
value: 'Nuget-Package'

steps:
- task: NuGetToolInstaller@1
Expand All @@ -23,38 +29,36 @@ steps:
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: 'Nuget-Package'
target: '$(buildTarget)'
verbosity: 'Verbose'
arguments: '-NugetArtifactsPath=$(Build.ArtifactStagingDirectory) -configuration=$(buildConfiguration)'

- task: VSBuild@1
displayName: 'Build Solution'
enabled: false
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
clean: true
createLogFile: true

- task: DotNetCoreCLI@2
enabled: false
displayName: 'NUnit Tests: Run'
inputs:
command: 'test'
projects: '$(solution)'
arguments: '-NugetArtifactsPath=$(Build.ArtifactStagingDirectory) -configuration=$(buildConfiguration)'

- task: PublishTestResults@2
displayName: 'NUnit Tests: Publish results'
enabled: false
displayName: 'Unit Tests: Publish results'
enabled: true
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'tests/**/TEST-*.xml'
testResultsFormat: 'VSTest'
testResultsFiles: '$(Build.SourcesDirectory)/artifacts/tests/**/*.trx'
mergeTestResults: true
failTaskOnFailedTests: true

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
Expand Down

0 comments on commit 8c2276c

Please sign in to comment.