69 lines
2.0 KiB
YAML
69 lines
2.0 KiB
YAML
# Starter pipeline
|
|
# Start with a minimal pipeline that you can customize to build and deploy your code.
|
|
# Add steps that build, run tests, deploy, and more:
|
|
# https://aka.ms/yaml
|
|
|
|
name: 'LCU.Api.Internal.ArchiverApi.$(Build.SourceBranchName).$(Date:yyyyMMdd)$(Rev:.r)'
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- '*'
|
|
|
|
pool:
|
|
name: LCUOnPrem
|
|
demands:
|
|
- SqlPackage
|
|
- MSBuild
|
|
|
|
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: '$(Parameters.TestProjects)'
|
|
arguments: '--configuration $(BuildConfiguration) --collect "Code coverage" --settings additional_test_args.runsettings'
|
|
|
|
- task: MSBuild@1
|
|
displayName: Build sql project
|
|
inputs:
|
|
solution: './LCU.Api.Internal.ArchiverApiSql/LCU.Api.Internal.ArchiverApiSql.sqlproj'
|
|
configuration: 'Release'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: Copy dacpac to artifact staging directory
|
|
inputs:
|
|
SourceFolder: './LCU.Api.Internal.ArchiverApiSql/bin/$(BuildConfiguration)/'
|
|
Contents: 'LCU.Api.Internal.ArchiverApiSql.dacpac'
|
|
TargetFolder: '$(build.artifactstagingdirectory)'
|
|
OverWrite: true
|
|
|
|
- task: NuGetCommand@2
|
|
condition: and (succeeded(), eq(variables['Build.SourceBranchName'], 'master') )
|
|
displayName: 'NuGet Push'
|
|
inputs:
|
|
command: 'push'
|
|
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg'
|
|
publishVstsFeed: '58ebbac4-8e98-4281-bb3f-58003852f4a7'
|
|
allowPackageConflicts: 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' |