@@ -2,184 +2,62 @@ pr: none
2
2
trigger : none
3
3
4
4
jobs :
5
- - job : SmokeTest
6
- timeoutInMinutes : 180
7
- strategy :
8
- matrix :
9
- Windows PS 5.1.14 :
10
- Image_Name : ' vs2017-win2016'
11
- PSVersion : ' 5.1.14'
12
- Windows PS 6.2.4 :
13
- Image_Name : ' vs2017-win2016'
14
- PSVersion : ' 6.2.4'
15
- Windows PS 7.0.3 :
16
- Image_Name : ' vs2017-win2016'
17
- PSVersion : ' 7.0.3'
18
- Linux PS 6.2.4 :
19
- Image_Name : ' ubuntu-18.04'
20
- PSVersion : ' 6.2.4'
21
- Linux PS 7.0.3 :
22
- Image_Name : ' ubuntu-18.04'
23
- PSVersion : ' 7.0.3'
24
- MacOS PS 6.2.4 :
25
- Image_Name : ' macOS-10.15'
26
- PSVersion : ' 6.2.4'
27
- MacOS PS 7.0.3 :
28
- Image_Name : ' macOS-10.15'
29
- PSVersion : ' 7.0.3'
30
- pool :
31
- vmImage : $(Image_Name)
32
-
33
- steps :
34
- - task : PowerShell@2
35
- displayName : Prepare Powershell $(PSVersion)
36
- inputs :
37
- filePath : ' tools/Test/SmokeTest/PrepareRequiredPowershell.ps1'
38
- arguments : ' -RequiredPsVersion $(PSVersion)'
39
-
40
- - task : DownloadPipelineArtifact@2
41
- condition : and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'), eq(variables['PipelineId'], ''))
42
- displayName : Download Latest Artifacts from Build Pipeline
43
- inputs :
44
- buildType : specific
45
- project : $(ProjectToDownloadArtifacts)
46
- definition : $(BuildPipelineName)
47
- buildVersionToDownload : ' latest'
48
- artifactName : $(ArtifactName)
49
- targetPath : $(Pipeline.Workspace)
50
-
51
- - task : DownloadPipelineArtifact@2
52
- condition : and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'), ne(variables['PipelineId'], ''))
53
- displayName : Download Specified Artifacts from Build Pipeline
54
- inputs :
55
- buildType : ' specific'
56
- project : $(ProjectToDownloadArtifacts)
57
- definition : $(BuildPipelineName)
58
- buildVersionToDownload : ' specific'
59
- pipelineId : $(PipelineId)
60
- artifactName : ' $(ArtifactName)'
61
- targetPath : ' $(Pipeline.Workspace)'
62
-
63
- - task : PowerShell@2
64
- condition : and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
65
- displayName : Copy Artifacts to LocalRepo
66
- inputs :
67
- targetType : ' inline'
68
- script : |
69
- New-Item -Path "$(Pipeline.Workspace)" -Name "LocalRepo" -ItemType "directory"
70
- Copy-Item -Path "$(Pipeline.Workspace)\\*.nupkg" -Destination "$(Pipeline.Workspace)\\LocalRepo\\"
71
- Write-Host "List artifacts..."
72
- Get-ChildItem "$(Pipeline.Workspace)\\LocalRepo\\"
73
-
74
- - task : NuGetCommand@2
75
- condition : and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
76
- displayName : ' Download Previous Release .nupkg Files'
77
- inputs :
78
- command : custom
79
- arguments : ' install Az -directdownload -packagesavemode nupkg -source https://www.powershellgallery.com/api/v2 -OutputDirectory packages'
80
-
81
- - task : PowerShell@2
82
- condition : and(succeeded(), eq(variables['GalleryName'], 'LocalRepo'))
83
- displayName : ' Copy Previous Release .nupkg files to LocalRepo'
84
- inputs :
85
- targetType : ' inline'
86
- script : |
87
- Get-ChildItem $(System.DefaultWorkingDirectory)/packages -Recurse -Include *.nupkg | Copy-Item -Destination "$(Pipeline.Workspace)\\LocalRepo\\" -Force
88
- Write-Host "List localRepo..."
89
- Get-ChildItem "$(Pipeline.Workspace)\\LocalRepo\\"
90
-
91
- - task : PowerShell@2
92
- displayName : Install Az Modules from $(GalleryName)
93
- inputs :
94
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
95
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAzModules.ps1 -Gallery $(GalleryName) -LocalRepoLocation $(LocalRepoLocation)"'
96
-
97
- - task : PowerShell@2
98
- displayName : Connect AzAccount
99
- inputs :
100
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
101
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/ConnectAzAccount.ps1 $(Password) $(ServicePrincipal) $(TenantId) $(SubscriptionId) "'
102
-
103
- - task : PowerShell@2
104
- displayName : Run Smoke Test
105
- inputs :
106
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
107
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 "'
108
-
109
- - task : PowerShell@2
110
- displayName : ' Run Smoke Test Reversely'
111
- inputs :
112
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
113
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 -Reverse"'
114
-
115
- - task : PowerShell@2
116
- displayName : Clean Az Modules
117
- inputs :
118
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
119
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'
120
-
121
- - task : PowerShell@2
122
- displayName : Update Az Modules
123
- inputs :
124
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
125
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/UpdateAzModules.ps1 -Gallery $(GalleryName) -AllowEquality $(AllowEquality) "'
126
-
127
- - task : PowerShell@2
128
- displayName : Run Smoke Test
129
- inputs :
130
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
131
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 "'
132
-
133
- - task : PowerShell@2
134
- displayName : ' Run Smoke Test Reversely'
135
- inputs :
136
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
137
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/RmCoreSmokeTests.ps1 -Reverse "'
138
-
139
- - task : PowerShell@2
140
- displayName : Clean Az Modules
141
- inputs :
142
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
143
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'
5
+ - template : util/smoke-test-steps.yml
6
+ parameters :
7
+ name : ' Win_PS5_1_14_SmokeTest'
8
+ vmImage : ' vs2017-win2016'
9
+ psVersion : ' 5.1.14'
10
+
11
+ - template : util/smoke-test-steps.yml
12
+ parameters :
13
+ name : ' Win_PS6_2_4_SmokeTest'
14
+ vmImage : ' vs2017-win2016'
15
+ psVersion : ' 6.2.4'
16
+
17
+ - template : util/smoke-test-steps.yml
18
+ parameters :
19
+ name : ' Win_PS7_0_3_SmokeTest'
20
+ vmImage : ' vs2017-win2016'
21
+ psVersion : ' 7.0.3'
22
+
23
+ - template : util/smoke-test-steps.yml
24
+ parameters :
25
+ name : ' Win_Latest_PS_SmokeTest'
26
+ vmImage : ' vs2017-win2016'
27
+ psVersion : ' latest'
28
+
29
+ - template : util/smoke-test-steps.yml
30
+ parameters :
31
+ name : ' Linux_PS6_2_4_SmokeTest'
32
+ vmImage : ' ubuntu-18.04'
33
+ psVersion : ' 6.2.4'
34
+
35
+ - template : util/smoke-test-steps.yml
36
+ parameters :
37
+ name : ' Linux_PS7_0_3_SmokeTest'
38
+ vmImage : ' ubuntu-18.04'
39
+ psVersion : ' 7.0.3'
40
+
41
+ - template : util/smoke-test-steps.yml
42
+ parameters :
43
+ name : ' Linux_Latest_PS_SmokeTest'
44
+ vmImage : ' ubuntu-18.04'
45
+ psVersion : ' latest'
144
46
145
- - task : PowerShell@2
146
- displayName : Install an individual module
147
- inputs :
148
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
149
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAnIndividualModule.ps1 -Gallery $(GalleryName) "'
150
-
151
- - task : PowerShell@2
152
- displayName : Clean Az Modules
153
- inputs :
154
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
155
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'
156
-
157
- - task : PowerShell@2
158
- displayName : Update an individual module
159
- inputs :
160
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
161
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/UpdateAnIndividualModule.ps1 -Gallery $(GalleryName) -AllowEquality $(AllowEquality) "'
162
-
163
- - task : PowerShell@2
164
- displayName : Clean Az Modules
165
- inputs :
166
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
167
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'
168
-
169
- - task : PowerShell@2
170
- displayName : Install Az on top of an individual module
171
- inputs :
172
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
173
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAzOnTopOfAnIndividualModule.ps1 -Gallery $(GalleryName) -AllowEquality $(AllowEquality) "'
174
-
175
- - task : PowerShell@2
176
- displayName : Clean Az Modules
177
- inputs :
178
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
179
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/CleanAzModules.ps1"'
180
-
181
- - task : PowerShell@2
182
- displayName : Install an individual module on top of Az
183
- inputs :
184
- filePath : ' tools/Test/SmokeTest/ScriptsCaller.ps1'
185
- arguments : ' -RequiredPsVersion $(PSVersion) -Script "./tools/Test/SmokeTest/InstallAnIndividualModuleOnTopOfAz.ps1 -Gallery $(GalleryName) -AllowEquality $(AllowEquality) "'
47
+ - template : util/smoke-test-steps.yml
48
+ parameters :
49
+ name : ' MacOS_PS6_2_4_SmokeTest'
50
+ vmImage : ' macOS-10.15'
51
+ psVersion : ' 6.2.4'
52
+
53
+ - template : util/smoke-test-steps.yml
54
+ parameters :
55
+ name : ' MacOS_PS7_0_3_SmokeTest'
56
+ vmImage : ' macOS-10.15'
57
+ psVersion : ' 7.0.3'
58
+
59
+ - template : util/smoke-test-steps.yml
60
+ parameters :
61
+ name : ' MacOS_Latest_PS_SmokeTest'
62
+ vmImage : ' macOS-10.15'
63
+ psVersion : ' latest'
0 commit comments