-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
84 lines (67 loc) · 2.4 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
# 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
pool:
vmImage: 'vs2017-win2016'
variables:
- group: keyvault-group-name
trigger:
- '*'
pr:
- master
steps:
- task: DownloadPackage@1
displayName: 'Download Package'
inputs:
feed: 'BuildHelpers'
definition: 'BuildHelpers'
version: 2.0.0
- powershell: |
# Test task for checking environment info
# can be disabled unless doing development
#gci $ENV:System_ArtifactsDirectory
#test-path "$ENV:System_ArtifactsDirectory\buildhelpers.nupkg"
#Install-Package "$ENV:System_ArtifactsDirectory\buildhelpers.nupkg"
#get-command Get-GitChangedFile -syntax
# Use the environment variables input below to pass secret variables to this script.
$env:PSModulePath
#get-module -ListAvailable az.accounts |fl
#Import-Module Az.Accounts, Az.Automation
#get-module -ListAvailable az.accounts |fl
gci C:\Modules\az*
errorActionPreference: continue
displayName: 'run PS'
enabled: false
- task: PowerShell@2
displayName: 'PowerShell Script'
inputs:
targetType: filePath
filePath: './.\Build\build.ps1'
env:
AzureRunbooksCI_TenantID: $(AzureRunbooksCI-TenantID)
AzureRunbooksCI_rgname: $(AzureRunbooksCI-rgname)
AzureRunbooksCI_aaname_test: $(AzureRunbooksCI-aaname-test)
AzureRunbooksCI_sppswd_test: $(AzureRunbooksCI-sppswd-test)
AzureRunbooksCI_spuser_test: $(AzureRunbooksCI-spuser-test)
AzureRunbooksCI_aaname_prod: $(AzureRunbooksCI-aaname-prod)
- task: PublishTestResults@2
displayName: 'Publish Test Results Build/*TestResults_PS*.xml'
inputs:
testResultsFormat: NUnit
testResultsFiles: 'Build/*TestResults_PS*.xml'
condition: succeededOrFailed()
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: ReportGenerator
inputs:
reports: 'Build/CodeCoverage_PS*.xml'
reporttypes: 'HtmlInline_AzurePipelines'
sourcedirs: .
verbosity: Verbose
condition: not(contains(variables['BHCommitMessage'],'!skipcodecoverage'))
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from Build/CodeCoverage_PS*.xml'
inputs:
summaryFileLocation: 'Build/CodeCoverage_PS*.xml'
reportDirectory: coveragereport
condition: not(contains(variables['BHCommitMessage'],'!skipcodecoverage'))