50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: 'LCU.API.Internal.Document.$(Build.SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r)'
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- '*'
|
|
|
|
pool:
|
|
name: LCUOnPrem
|
|
demands:
|
|
- Agent.Name -equals D1UTL01Q
|
|
|
|
variables:
|
|
buildConfiguration: 'Release'
|
|
|
|
steps:
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: 'restore'
|
|
feedsToUse: 'select'
|
|
vstsFeed: '58ebbac4-8e98-4281-bb3f-58003852f4a7'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
inputs:
|
|
command: 'build'
|
|
projects: '**/*.csproj'
|
|
arguments: '--configuration $(buildConfiguration)'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: Test
|
|
inputs:
|
|
command: test
|
|
projects: '**/*Test.csproj'
|
|
arguments: '--configuration $(BuildConfiguration) --collect "Code coverage"'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'dotnet publish $(buildConfiguration)'
|
|
inputs:
|
|
command: 'publish'
|
|
publishWebProjects: false
|
|
projects: '**/*.csproj'
|
|
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
|
|
zipAfterPublish: true
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
condition: and (succeeded(), or( eq(variables['Build.SourceBranchName'], 'develop'), eq(variables['Build.SourceBranchName'], 'master')) )
|
|
displayName: 'Publish Artifact: dist'
|
|
inputs:
|
|
PathtoPublish: '$(build.artifactstagingdirectory)'
|
|
ArtifactName: 'dist'
|