@@ -17,6 +17,12 @@ steps:
1717 displayName : Start collect diagnostics
1818 condition : and(succeeded(), eq(variables.collect_diagnostics, 'true'))
1919
20+ # Use .NET SDK 8
21+ - task : UseDotNet@2
22+ displayName : ' Install .NET Core SDK 8.x'
23+ inputs :
24+ version : 8.x
25+
2026# Use node 20, npm 9
2127- task : NodeTool@0
2228 displayName : Use node 20
@@ -79,45 +85,6 @@ steps:
7985- powershell : ./ci/set-sprint-variables.ps1
8086 displayName : Set currentSprint variables
8187
82- - template : /ci/generate-branch-name.yml@self
83- parameters :
84- prefix : releases
85-
86- - powershell : |
87- $releaseBranch = "$(branchName)"
88- $isDryRun = "$(isDryRun)"
89-
90- # add config entry to avoid errors while pulling
91- git config --global user.email "$(username)@microsoft.com"
92- git config --global user.name "$(username)"
93-
94- Write-Host 'Enabling verbose git tracing..'
95- git config --global http.verbose true
96- $env:GIT_TRACE = 1
97- $env:GIT_CURL_VERBOSE = 1
98-
99- # Pull commits from remote and push branch to git
100- git checkout -b $releaseBranch
101- if( $isDryRun -eq 'true' ) {
102- Write-Host "DRY RUN: Skipping Git push operations to remote repository"
103- }else{
104- Write-Host "Trying to pull the remote branch.."
105- git pull https://$(GitHubPAT)@github.com/microsoft/azure-pipelines-tasks $releaseBranch
106- if (-not $?) {
107- Write-Host "Failed to pull the remote branch. This is expected if the remote branch doesn't exist."
108- }
109- Write-Host "Trying to push to the remote branch.."
110- git push https://$(GitHubPAT)@github.com/microsoft/azure-pipelines-tasks $releaseBranch
111- }
112- condition : |
113- and(
114- succeeded(),
115- in(variables['build.reason'], 'Schedule', 'Manual'),
116- eq(variables['COURTESY_PUSH'], 'true'),
117- eq(variables['Build.SourceBranch'], 'refs/heads/master')
118- )
119- displayName : Push release branch
120-
12188- script : node ./ci/check-downgrading.js --task "$(task_pattern_fordowngradingcheck)" --sprint $(currentSprint) --week $(currentSprintWeek)
12289 displayName : Check for downgrading tasks
12390 # remove SourceBranch condition after merging users/merlynop/node20merge-2 ; see https://github.com/microsoft/azure-pipelines-tasks/pull/20819
@@ -164,11 +131,27 @@ steps:
164131 ne(variables['numTasks'], 0)
165132 )
166133
134+ # Test
135+ - script : node make.js test
136+ displayName : Run tests
137+ condition : and(succeeded(), ne(variables['numTasks'], 0), ne(variables['tasksSkipTests'], 'true'))
138+
139+ - script : node make.js testLegacy --task "$(getTaskPattern.task_pattern)"
140+ displayName : Legacy tests with node 6
141+ condition : and(succeeded(), ne(variables['numTasks'], 0), ne(variables['tasksSkipTests'], 'true'))
142+
143+ # Publish code coverage result
144+ - task : PublishCodeCoverageResults@1
145+ displayName : Publish Code Coverage Results
146+ inputs :
147+ codeCoverageTool : Cobertura
148+ summaryFileLocation : $(System.DefaultWorkingDirectory)/_build/coverage/*coverage.xml
149+
167150# Only on Windows:
168151- ${{ if eq(parameters.os, 'Windows_NT') }} :
169152
170153 # Stage tasks individually into the package directory
171- - script : node ./ci/stage-package.js false individually
154+ - script : node ./ci/stage-package.js true individually
172155 displayName : Stage tasks individually into the package directory
173156 condition : |
174157 and(
@@ -183,7 +166,7 @@ steps:
183166 layoutRoot : $(Build.SourcesDirectory)\_package\tasks-layout
184167
185168 # Stage all the tasks into a single zip for upload
186- - script : node ./ci/stage-package.js false
169+ - script : node ./ci/stage-package.js
187170 displayName : Stage all the tasks into a single zip for upload
188171 condition : |
189172 and(
@@ -192,21 +175,6 @@ steps:
192175 ne(variables['numTasks'], 0)
193176 )
194177
195- # Test
196- - script : node make.js test
197- displayName : Run tests
198- condition : and(succeeded(), ne(variables['numTasks'], 0), ne(variables['tasksSkipTests'], 'true'))
199- - script : node make.js testLegacy --task "$(getTaskPattern.task_pattern)"
200- displayName : Legacy tests with node 6
201- condition : and(succeeded(), ne(variables['numTasks'], 0), ne(variables['tasksSkipTests'], 'true'))
202-
203- # Publish code coverage result
204- - task : PublishCodeCoverageResults@1
205- displayName : Publish Code Coverage Results
206- inputs :
207- codeCoverageTool : Cobertura
208- summaryFileLocation : $(System.DefaultWorkingDirectory)/_build/coverage/*coverage.xml
209-
210178# Only when building on Windows:
211179- ${{ if eq(parameters.os, 'Windows_NT') }} :
212180
@@ -218,26 +186,4 @@ steps:
218186 always(),
219187 eq(variables.collect_diagnostics, 'true'),
220188 ne(variables['numTasks'], 0)
221- )
222-
223- - powershell : |
224- $releaseBranch = "$(branchName)"
225- $isDryRun = "$(isDryRun)"
226-
227- if (($(currentSprintWeek) -eq 3) -or ($isDryRun -eq 'true')) {
228- cd $(System.DefaultWorkingDirectory)/ci/ci-release-notes
229- npm ci
230- node release-notes.js --token $(GitHubPAT) --version $(currentSprint) --releaseBranch $releaseBranch --isDryRun $isDryRun
231- } else {
232- echo "Skipping since release notes generating on week 3"
233- }
234- condition: |
235- and(
236- succeeded(),
237- in(variables['build.reason'], 'Schedule', 'Manual'),
238- eq(variables['COURTESY_PUSH'], 'true'),
239- eq(variables['Build.SourceBranch'], 'refs/heads/master'),
240- eq(${{ parameters.generateReleaseNotes }}, true)
241- )
242- continueOnError: true
243- displayName: Create Release
189+ )
0 commit comments