Work CI-CD
Adjust task to show build number for target being built.
Add new task to reset build number on pipeline.
***NO_CI***
@@ -13,7 +13,7 @@ steps:
custom: tool
arguments: install --tool-path ${{ parameters.repoDirectory }} nbgv
- - script: nbgv cloud -a -c
+ - script: nbgv cloud -a -c -v $(Build.BuildNumber)
displayName: Set build number
condition: succeeded()
workingDirectory: ${{ parameters.repoDirectory }}
@@ -42,9 +42,11 @@ steps:
if($env:Build_SourceBranch.StartsWith('release-') -or
$env:Build_SourceBranch.StartsWith('main'))
{
- Write-Host "$("##vso[task.setvariable variable=TARGET_BUILD_COUNTER]")$env:NBGV_BuildNumber"
+ Write-Host "$("##vso[task.setvariable variable=TARGET_BUILD_COUNTER]")$env:NBGV_RevisionNumber"
+ Write-Host "*** BUILD NUMBER IS: $(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$(NBGV_RevisionNumber) ***"
}
else
{
Write-Host "$("##vso[task.setvariable variable=TARGET_BUILD_COUNTER]")$version"
+ Write-Host "*** BUILD NUMBER IS: $(NBGV_VersionMajor).$(NBGV_VersionMinor).$(NBGV_BuildNumber).$version ***"
}
