-
Notifications
You must be signed in to change notification settings - Fork 21
/
azure-pipelines.yml
75 lines (62 loc) · 2.06 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
75
trigger:
batch: true
branches:
include:
- master
- rel/*
pr: none
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
majorMinorPatchVersion: '15.1.13'
buildVersion: $[counter(variables['majorMinorPatchVersion'], 0)]
name: $(majorMinorPatchVersion).$(buildVersion)
name: $(majorMinorPatchVersion).$(buildVersion)
steps:
- task: NuGetToolInstaller@0
displayName: Use Latest NuGet
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'SonarCloudFOrGSKit2'
organization: 'sdl'
scannerMode: 'MSBuild'
projectKey: 'groupsharekit'
projectName: 'GroupShareKit'
- task: VSBuild@1
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
inputs:
pollingTimeoutSec: '300'
- powershell: |
mkdir $(Build.ArtifactStagingDirectory)\Package
ls *.nuspec | %{ nuget pack $_.FullName -version "$(name)" -NoPackageAnalysis -OutputDirectory $(Build.ArtifactStagingDirectory)\Packages -Properties "RepositoryType=git;RepositoryUrl=https://github.com/sdl/groupsharekit.net"}
displayName: Create package
condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
- task: NuGetCommand@2
displayName: 'NuGet push 1'
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'af66e256-9c46-4fba-ad75-09bf110ec1cc'
- task: CopyFiles@1
displayName: 'Copy files to artifact staging'
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: '**/$(BuildConfiguration)/**/*.*'
targetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
publisLocation: 'Azure Pipelines/TFS'