Skip to content

Commit

Permalink
Merge pull request #2 from jgdevlabs/dev
Browse files Browse the repository at this point in the history
Update azure-pipelines.yml for Azure Pipelines
  • Loading branch information
jooni91 committed Oct 6, 2019
2 parents 5ad6738 + 0b9d4da commit bd54f76
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

trigger:
- dev
- master

pr:
- master


pool:
vmImage: 'windows-latest'
Expand All @@ -13,6 +18,10 @@ variables:
solution: '**/GdprInfo.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
nugetPackOutputDir: '$(Build.ArtifactStagingDirectory)/Packages'



steps:
- task: NuGetToolInstaller@1
Expand All @@ -32,4 +41,21 @@ steps:
command: 'test'
projects: '**/tests/GdprInfo.Tests/GdprInfo.Tests.csproj'
testRunTitle: 'Shared Layer Tests'
workingDirectory: '$(System.DefaultWorkingDirectory)'
workingDirectory: '$(System.DefaultWorkingDirectory)'

- task: DotNetCoreCLI@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
command: 'pack'
packagesToPack: '**/src/GdprInfo.csproj'
configuration: '$(buildConfiguration)'
versioningScheme: 'byEnvVar'
versionEnvVar: '$(major).$(minor).$(patch)'
outputDir: '$(nugetPackOutputDir)'

- task: PublishBuildArtifacts@1
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
PathtoPublish: '$(nugetPackOutputDir)'
ArtifactName: 'nuget'
publishLocation: 'Container'

0 comments on commit bd54f76

Please sign in to comment.