-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
86 lines (66 loc) · 2.85 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
76
77
78
79
80
81
82
83
84
85
86
resources:
- repo: self
trigger:
batch: true
branches:
include: [ master, develop ]
queue:
name: Hosted VS2017
demands: npm
steps:
- task: gittools.gitversion.gitversion-task.GitVersion@4
displayName: GitVersion
inputs:
preferBundledVersion: false
- task: richardfennellBM.BM-VSTS-PesterRunner-Task.Pester-Task.Pester@8
displayName: 'Pester Test Runner'
inputs:
scriptFolder: "@{Path=''$(Build.SourcesDirectory)'; Parameters=@{AgentToolPath ='$(Agent.WorkFolder)'}}"
resultsFile: '$(Build.SourcesDirectory)\Test-Pester.XML'
run32Bit: false
enabled: false
- task: PublishTestResults@2
displayName: 'Publish Test Results **\Test-*.xml'
inputs:
testResultsFormat: NUnit
testResultsFiles: '**\Test-*.xml'
searchFolder: '$(Build.SourcesDirectory)'
enabled: false
condition: succeededOrFailed()
- powershell: '$(Build.SourcesDirectory)/tools/PrepareExtension.ps1'
displayName: 'Copy Common PowerShell Modules Into Tasks'
- powershell: '$(Build.SourcesDirectory)/tools/GenerateChangelog.ps1'
displayName: 'Generate Extension Readme.md'
- task: geeklearningio.gl-vsts-tasks-file-patch.json-patch-task.JsonPatch@3
displayName: 'Patch DeployArtifactsWithPnP task.json'
inputs:
JsonWorkingDir: '$(Build.SourcesDirectory)/src/DeployArtifactsWithPnP/DeployArtifactsWithPnPV1'
JsonTargetFilters: task.json
JsonPatchContent: '= /version/Patch => "$(GitVersion.CommitsSinceVersionSource)"'
OutputPatchFile: true
- task: geeklearningio.gl-vsts-tasks-file-patch.json-patch-task.JsonPatch@3
displayName: 'Patch PnPPowerShell task.json'
inputs:
JsonWorkingDir: '$(Build.SourcesDirectory)/src/PnPPowerShell/PnPPowerShellV1'
JsonTargetFilters: task.json
JsonPatchContent: '= /version/Patch => "$(GitVersion.CommitsSinceVersionSource)"'
OutputPatchFile: true
- task: ms-devlabs.vsts-developer-tools-build-tasks.package-extension-build-task.PackageVSTSExtension@1
displayName: 'Package Extension for every branch except master'
inputs:
rootFolder: src
outputPath: '$(Build.ArtifactStagingDirectory)/package/'
extensionVersion: '$(GitVersion.Major).$(GitVersion.Minor).$(GitVersion.CommitsSinceVersionSource)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/master'))
- task: ms-devlabs.vsts-developer-tools-build-tasks.package-extension-build-task.PackageVSTSExtension@1
displayName: 'Package Extension for refs/heads/master only'
inputs:
rootFolder: src
outputPath: '$(Build.ArtifactStagingDirectory)/package/'
extensionVersion: '$(GitVersion.Major).$(GitVersion.Minor).$(GitVersion.Patch)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: PnPTasks'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/package/'
ArtifactName: PnPTasks