-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
74 lines (64 loc) · 2.13 KB
/
azure-pipelines.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildNumber: 0.0.0-$(Date:yyyyMMdd)$(Rev:.r)
buildConfiguration: 'Release'
steps:
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
Write-Host "buildConfiguration...................... $(buildConfiguration)"
Write-Host "buildNumber............................. $buildNumber"
Write-Host "Build repository local path............. $(Build.Repository.LocalPath)"
Write-Host "Build artifact staging directory........ $(build.artifactstagingdirectory)"
failOnStderr: true
pwsh: true
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'restore'
projects: '$(Build.Repository.LocalPath)/**/*.csproj'
feedsToUse: 'config'
nugetConfigPath: 'nuget.config'
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: '$(Build.Repository.LocalPath)/**/DotNet.SystemCollections.Analyzers.Test.csproj'
testRunTitle: 'Evaluating .NET analyzers functionality'
- task: DotNetCoreCLI@2
displayName: Pack
inputs:
command: 'pack'
arguments: '**/DotNet.SystemCollections.Analyzers.csproj'
packDirectory: '$(build.artifactstagingdirectory)'
nobuild: true
versioningScheme: 'byPrereleaseNumber'
majorVersion: '1'
minorVersion: '0'
patchVersion: '0'
- task: DotNetCoreCLI@2
displayName: Push
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '52aea7be-35e6-45f8-9736-5e7007cb8ab9/38f18ef3-8233-4a17-a440-e7560da3d3e1'
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(Build.Repository.LocalPath)'
TargetFolder: '$(build.artifactstagingdirectory)/s'
CleanTargetFolder: true
OverWrite: true
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()