From 62b11d626cad3c1ca60d80644c3fb02793c89617 Mon Sep 17 00:00:00 2001 From: Matt Bacchi Date: Wed, 4 Sep 2019 16:40:21 -0600 Subject: [PATCH 1/2] Use shorter workspace on Windows CI builds (attempt #2) Correct string concatenation Wrap agent parameters in node block --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 267566b51b98..7d5229290451 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -572,7 +572,12 @@ pipeline { beforeAgent true expression { !SKIP_WINDOWS } } - agent { label "windows-ci" } + agent { + node { + label "windows-ci" + customWorkspace "${WINDOWS_CUSTOM_WORKSPACE}" + } + } environment { GIT_CACHE_PATH = "${USERPROFILE}\\cache" SCCACHE_BUCKET = credentials("brave-browser-sccache-win-s3-bucket") @@ -837,6 +842,7 @@ def setEnv() { if (env.SLACK_USERNAME) { slackSend(color: null, channel: env.SLACK_USERNAME, message: "[${BUILD_TAG_SLASHED} `${BRANCH}`] STARTED (<${BUILD_URL}/flowGraphTable/?auto_refresh=true|Open>)") } + WINDOWS_CUSTOM_WORKSPACE = "C:\\temp\\" + "PR-" + env.BC_PR_NUMBER + "-BLD-" + env.BUILD_NUMBER } def checkAndAbortBuild() { From dd62364692caaad8246a4d661a167707ddf24b75 Mon Sep 17 00:00:00 2001 From: Matt Bacchi Date: Fri, 6 Sep 2019 16:29:13 -0600 Subject: [PATCH 2/2] Shorten the path further, reuse the workspace for multiple PR builds --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7d5229290451..b8dd29fc42b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -842,7 +842,7 @@ def setEnv() { if (env.SLACK_USERNAME) { slackSend(color: null, channel: env.SLACK_USERNAME, message: "[${BUILD_TAG_SLASHED} `${BRANCH}`] STARTED (<${BUILD_URL}/flowGraphTable/?auto_refresh=true|Open>)") } - WINDOWS_CUSTOM_WORKSPACE = "C:\\temp\\" + "PR-" + env.BC_PR_NUMBER + "-BLD-" + env.BUILD_NUMBER + WINDOWS_CUSTOM_WORKSPACE = "C:\\temp\\" + "PR-" + env.BC_PR_NUMBER } def checkAndAbortBuild() {