Skip to content

Commit 86122ca

Browse files
authored
Build pipeline fixups (#8065)
1 parent 5948bf7 commit 86122ca

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

eng/pipelines/dotnet-monitor-publish.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extends:
5757
variables:
5858
- group: Release-Pipeline
5959
jobs:
60-
- job: Job_1
60+
- job: VerificationJob
6161
displayName: Release Verification
6262
condition: succeeded()
6363
timeoutInMinutes: 0
@@ -104,51 +104,52 @@ extends:
104104
targetType: inline
105105
script: |
106106
# Write your PowerShell commands here.
107-
$newReleaseName = "${env:ReleaseVersion}-${env:BUILD_BUILDNUMBER}";
108-
if ($(DRP_DraftRelease) -eq "true") {
109-
$newReleaseName += "[Draft]";
107+
$newReleaseName = "${env:ReleaseVersion}-${env:BUILD_BUILDNUMBER}"
108+
if ("$(DRP_DraftRelease)" -eq "true") {
109+
$newReleaseName += "[Draft]"
110110
}
111-
Write-Host "Setting release name to: $newReleaseName";
112-
Write-Host "##vso[build.updatebuildnumber]$newReleaseName";
111+
Write-Host "Setting release name to: $newReleaseName"
112+
Write-Host "##vso[build.updatebuildnumber]$newReleaseName"
113113
- task: PowerShell@2
114114
displayName: Check for Nuget Assets
115115
inputs:
116116
targetType: inline
117117
script: |-
118-
$nugetPath = "${env:DRP_MONITORRELEASE}\NugetAssets";
119-
Write-Host "Looking for nuget packages under $nugetPath";
118+
$nugetPath = "${env:DRP_MONITORRELEASE}\NugetAssets"
119+
Write-Host "Looking for nuget packages under $nugetPath"
120120
if (-not (Test-Path -path $nugetPath)) {
121-
Write-Host "##vso[task.logissue type=error]Can't find file at $nugetPath";
122-
exit 1;
121+
Write-Host "##vso[task.logissue type=error]Can't find file at $nugetPath"
122+
exit 1
123123
}
124124
else {
125-
$pkgs = Get-ChildItem -Path "$nugetPath" -Filter "*.nupkg" -Recurse;
126-
$measurePkgs = $pkgs | Measure-Object;
125+
$pkgs = Get-ChildItem -Path "$nugetPath" -Filter "*.nupkg" -Recurse
126+
$measurePkgs = $pkgs | Measure-Object
127127
if (${env:Monitor_PublishedPackageCount} -ne $measurePkgs.Count) {
128-
Write-Host "##vso[task.logissue type=error]Expected ${env:Monitor_PublishedPackageCount} .nupkg files, found $($measurePkgs.Count) packages.";
128+
Write-Host "##vso[task.logissue type=error]Expected ${env:Monitor_PublishedPackageCount} .nupkg files, found $($measurePkgs.Count) packages."
129129
}
130130
else {
131-
Write-Host "Found $($measurePkgs.Count) packages, as expected.";
131+
Write-Host "Found $($measurePkgs.Count) packages, as expected."
132132
}
133133
}
134134
- task: PowerShell@2
135135
displayName: Check for Release Notes
136136
inputs:
137137
targetType: inline
138138
script: |-
139-
$notesPath = $env:DRP_ReleaseNotes;
140-
Write-Host "Looking for release notes at $notesPath";
139+
$notesPath = $env:DRP_ReleaseNotes
140+
Write-Host "Looking for release notes at $notesPath"
141141
if (-not (Test-Path -path $notesPath)) {
142-
Write-Host "##vso[task.logissue type=error]Can't find file at $notesPath";
143-
exit 1;
142+
Write-Host "##vso[task.logissue type=error]Can't find file at $notesPath"
143+
exit 1
144144
}
145145
else {
146-
$notesContent = Get-Content -Path $notesPath;
147-
Write-Host "Contents of $notesPath :";
148-
Write-Host "$notesContent";
146+
$notesContent = Get-Content -Path $notesPath
147+
Write-Host "Contents of $notesPath :"
148+
Write-Host "$notesContent"
149149
}
150150
- job: PostDeploymentApprovalJob
151151
displayName: Post-Deployment Approval
152+
dependsOn: VerificationJob
152153
condition: succeeded()
153154
timeoutInMinutes: 0
154155
pool: server

0 commit comments

Comments
 (0)