This repository was archived by the owner on Oct 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -743,7 +743,7 @@ pipeline {
743743 SOURCES_DRIVE = ' d'
744744 SOURCES_SUBDIR = ' gopath'
745745 TESTRUN_DRIVE = ' d'
746- TESTRUN_SUBDIR = " CI- $B UILD_NUMBER "
746+ TESTRUN_SUBDIR = " CI"
747747 WINDOWS_BASE_IMAGE = ' mcr.microsoft.com/windows/servercore'
748748 WINDOWS_BASE_IMAGE_TAG = ' ltsc2016'
749749 }
@@ -804,7 +804,7 @@ pipeline {
804804 SOURCES_DRIVE = ' d'
805805 SOURCES_SUBDIR = ' gopath'
806806 TESTRUN_DRIVE = ' d'
807- TESTRUN_SUBDIR = " CI- $B UILD_NUMBER "
807+ TESTRUN_SUBDIR = " CI"
808808 WINDOWS_BASE_IMAGE = ' mcr.microsoft.com/windows/servercore'
809809 WINDOWS_BASE_IMAGE_TAG = ' ltsc2019'
810810 }
Original file line number Diff line number Diff line change @@ -51,6 +51,15 @@ Write-Host -ForegroundColor Red "-----------------------------------------------
5151# TESTRUN_DRIVE\TESTRUN_SUBDIR\CI-<CommitID> or
5252# d:\CI\CI-<CommitID>
5353#
54+ # Optional environment variables help in CI:
55+ #
56+ # BUILD_NUMBER + BRANCH_NAME are optional variables to be added to the directory below TESTRUN_SUBDIR
57+ # to have individual folder per CI build. If some files couldn't be
58+ # cleaned up and we want to re-run the build in CI.
59+ # Hence, the daemon under test is run under
60+ # TESTRUN_DRIVE\TESTRUN_SUBDIR\PR-<PR-Number>\<BuildNumber> or
61+ # d:\CI\PR-<PR-Number>\<BuildNumber>
62+ #
5463# In addition, the following variables can control the run configuration:
5564#
5665# DOCKER_DUT_DEBUG if defined starts the daemon under test in debug mode.
@@ -428,7 +437,12 @@ Try {
428437
429438 # Redirect to a temporary location.
430439 $TEMPORIG = $env: TEMP
431- $env: TEMP = " $env: TESTRUN_DRIVE `:\$env: TESTRUN_SUBDIR \CI-$COMMITHASH "
440+ if ($null -eq $env: BUILD_NUMBER ) {
441+ $env: TEMP = " $env: TESTRUN_DRIVE `:\$env: TESTRUN_SUBDIR \CI-$COMMITHASH "
442+ } else {
443+ # individual temporary location per CI build that better matches the BUILD_URL
444+ $env: TEMP = " $env: TESTRUN_DRIVE `:\$env: TESTRUN_SUBDIR \$env: BRANCH_NAME \$env: BUILD_NUMBER "
445+ }
432446 $env: LOCALAPPDATA = " $env: TEMP \localappdata"
433447 $errorActionPreference = ' Stop'
434448 New-Item - ItemType Directory " $env: TEMP " - ErrorAction SilentlyContinue | Out-Null
You can’t perform that action at this time.
0 commit comments