-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
102 lines (102 loc) · 4.23 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
trigger:
branches:
include:
- '*'
tags:
include:
- '*'
pr:
branches:
exclude:
- '*'
resources:
- repo: self
variables:
tag: '$(Build.BuildId)'
vmImageName: 'windows-2022'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
timeoutInMinutes: 120
displayName: Build
pool:
vmImage: $(vmImageName)
name: Test-Rafael
steps:
- pwsh: .\buildall.ps1
name: build_images
env:
REGISTRY_USER: $(REGISTRY_USER)
REGISTRY_PWD: $(REGISTRY_PWD)
MSSQLINSTALL_CU_URL: $(MSSQLINSTALL_CU_URL)
MSSQLINSTALL_CUFIX_URL: $(MSSQLINSTALL_CUFIX_URL)
MSSQLINSTALL_ISO_URL: $(MSSQLINSTALL_ISO_URL)
MSSQL2019LINSTALL_CU_URL: $(MSSQL2019INSTALL_CU_URL)
MSSQL2019INSTALL_CUFIX_URL: $(MSSQL2019INSTALL_CUFIX_URL)
MSSQL2019INSTALL_ISO_URL: $(MSSQL2019INSTALL_ISO_URL)
MSSQL2017LINSTALL_CU_URL: $(MSSQL2017INSTALL_CU_URL)
MSSQL2017INSTALL_CUFIX_URL: $(MSSQL2017INSTALL_CUFIX_URL)
MSSQL2017INSTALL_ISO_URL: $(MSSQL2017INSTALL_ISO_URL)
REGISTRY_PATH: $(REGISTRY_PATH)
IMAGE_VERSION: $(Build.SourceBranchName)
TEMP: $(Agent.TempDirectory)
TESTS_SAS_URL: $(TESTS_SAS_URL)
- pwsh: .\buildall.ps1 -Test
name: run_tests
# Only build if [build] is present
condition: not(contains(variables['Build.SourceVersionMessage'], '[notest]'))
env:
REGISTRY_USER: $(REGISTRY_USER)
REGISTRY_PWD: $(REGISTRY_PWD)
MSSQLINSTALL_CU_URL: $(MSSQLINSTALL_CU_URL)
MSSQLINSTALL_CUFIX_URL: $(MSSQLINSTALL_CUFIX_URL)
MSSQLINSTALL_ISO_URL: $(MSSQLINSTALL_ISO_URL)
MSSQL2019LINSTALL_CU_URL: $(MSSQL2019INSTALL_CU_URL)
MSSQL2019INSTALL_CUFIX_URL: $(MSSQL2019INSTALL_CUFIX_URL)
MSSQL2019INSTALL_ISO_URL: $(MSSQL2019INSTALL_ISO_URL)
MSSQL2017LINSTALL_CU_URL: $(MSSQL2017INSTALL_CU_URL)
MSSQL2017INSTALL_CUFIX_URL: $(MSSQL2017INSTALL_CUFIX_URL)
MSSQL2017INSTALL_ISO_URL: $(MSSQL2017INSTALL_ISO_URL)
REGISTRY_PATH: $(REGISTRY_PATH)
IMAGE_VERSION: $(Build.SourceBranchName)
TESTDIR: $(System.DefaultWorkingDirectory)
TEMP: $(Agent.TempDirectory)
TESTS_SAS_URL: $(TESTS_SAS_URL)
- task: PublishTestResults@2
name: publish_tests_results
condition: and(not(canceled()), not(contains(variables['Build.SourceVersionMessage'], '[notest]')))
inputs:
testResultsFormat: 'NUnit' # 'JUnit' | 'NUnit' | 'VSTest' | 'XUnit' | 'CTest'. Alias: testRunner. Required. Test result format. Default: JUnit.
testResultsFiles: '**/*.xml' # string. Required. Test results files. Default: **/TEST-*.xml.
searchFolder: '$(System.DefaultWorkingDirectory)/NUnit' # string. Search folder. Default: $(System.DefaultWorkingDirectory).
# mergeTestResults: true
failTaskOnFailedTests: true
failTaskOnFailureToPublishResults: true
failTaskOnMissingResultsFile: true
testRunTitle: Pester
# Advanced
#buildPlatform: # string. Alias: platform. Build Platform.
#buildConfiguration: # string. Alias: configuration. Build Configuration.
publishRunAttachments: true
- pwsh: .\buildall.ps1 -Push
name: push_containers
# Only push if this is a tag, and the tests passed
condition: or(and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')), contains(variables['Build.SourceVersionMessage'], '[push]'))
env:
REGISTRY_USER: $(REGISTRY_USER)
REGISTRY_PWD: $(REGISTRY_PWD)
MSSQLINSTALL_CU_URL: $(MSSQLINSTALL_CU_URL)
MSSQLINSTALL_CUFIX_URL: $(MSSQLINSTALL_CUFIX_URL)
MSSQLINSTALL_ISO_URL: $(MSSQLINSTALL_ISO_URL)
MSSQL2019LINSTALL_CU_URL: $(MSSQL2019INSTALL_CU_URL)
MSSQL2019INSTALL_CUFIX_URL: $(MSSQL2019INSTALL_CUFIX_URL)
MSSQL2019INSTALL_ISO_URL: $(MSSQL2019INSTALL_ISO_URL)
MSSQL2017LINSTALL_CU_URL: $(MSSQL2017INSTALL_CU_URL)
MSSQL2017INSTALL_CUFIX_URL: $(MSSQL2017INSTALL_CUFIX_URL)
MSSQL2017INSTALL_ISO_URL: $(MSSQL2017INSTALL_ISO_URL)
REGISTRY_PATH: $(REGISTRY_PATH)
IMAGE_VERSION: $(Build.SourceBranchName)
TEMP: $(Agent.TempDirectory)
TESTS_SAS_URL: $(TESTS_SAS_URL)