-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines-1.yml
46 lines (42 loc) · 1.66 KB
/
azure-pipelines-1.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
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
pool:
vmImage: 'vs2017-win2016'
variables:
buildConfiguration: 'Release'
TF_BUILD: 1
steps:
- task: DotNetCoreCLI@2
displayName: 'Populate gitversion variables'
inputs:
command: 'custom'
custom: 'msbuild'
arguments: '-restore -target:WriteVersionInfoToBuildLog -verbosity:n Singer.API/Singer.csproj'
feedsToUse: 'select'
versioningScheme: 'off'
- task: DotNetCoreCLI@2
displayName: 'Build $(buildConfiguration)'
inputs:
command: build
projects: '**/*.csproj'
configuration: $(buildConfiguration)
- task: DotNetCoreCLI@2
displayName: 'dotnet publish'
inputs:
command: publish
publishWebProjects: true
arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
zipAfterPublish: true
- task: DotNetCoreCLI@2
displayName: 'dotnet custom msbuild'
inputs:
command: 'custom'
custom: 'msbuild'
arguments: 'Singer.sln /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(BuildConfiguration)/zip" /p:Platform="any cpu" /p:Configuration=Release'
- script: 'echo ##vso[build.updatebuildnumber]$(GitVersion.SemVer)+build$(Build.BuildId)'
displayName: 'Set Build.BuildNumber'
- task: PublishBuildArtifacts@1
inputs:
ArtifactName: $(System.TeamProject)-$(Build.BuildNumber)