From 250e527cf19928771a59120b94f7ecacd9c5f432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Fri, 13 Dec 2019 15:08:41 +0000 Subject: [PATCH] added access to result storage --- containers/agent-windows-jenkins/Dockerfile | 3 +++ containers/build_run.ps1 | 2 +- kubernetes/windows_agent_bootstrap.ps1 | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/containers/agent-windows-jenkins/Dockerfile b/containers/agent-windows-jenkins/Dockerfile index 2dd8681..697cc24 100644 --- a/containers/agent-windows-jenkins/Dockerfile +++ b/containers/agent-windows-jenkins/Dockerfile @@ -13,6 +13,9 @@ RUN powershell -NoProfile -InputFormat None -Command ` mkdir c:\jenkins ; ` Invoke-WebRequest -Uri %SWARM_PLUGIN_URL% -OutFile %SWARM_PLUGIN_JAR% +# network storage for build results +VOLUME C:\results + # start swarm plugin COPY start_agent.bat c:\jenkins CMD c:\jenkins\start_agent.bat \ No newline at end of file diff --git a/containers/build_run.ps1 b/containers/build_run.ps1 index 5bcd2c2..3327b09 100644 --- a/containers/build_run.ps1 +++ b/containers/build_run.ps1 @@ -29,7 +29,7 @@ If ($LastExitCode -ne 0) { } # mount a persistent workspace for experiments -docker run -it -v D:\:C:\ws $IMAGE_NAME $CMD +docker run -it -v D:\:C:\ws -v E:\results:C:\results $IMAGE_NAME $CMD If ($LastExitCode -ne 0) { exit } \ No newline at end of file diff --git a/kubernetes/windows_agent_bootstrap.ps1 b/kubernetes/windows_agent_bootstrap.ps1 index bb4b4b4..68f9c3c 100644 --- a/kubernetes/windows_agent_bootstrap.ps1 +++ b/kubernetes/windows_agent_bootstrap.ps1 @@ -20,6 +20,10 @@ Initialize-Disk -Number $diskid New-Partition -DiskNumber $diskid -UseMaximumSize -AssignDriveLetter Format-Volume -DriveLetter D +Write-Host "Mounting result storage..." +Install-WindowsFeature NFS-Client +net use E: \\results.local\exports + Write-Host "Authenticating with gcloud..." # TODO: make this quiet and non-interactive # TODO: check if this works if it's already installed @@ -28,4 +32,4 @@ docker-credential-gcr configure-docker Write-Host "Launching docker container, this might take a while..." docker pull gcr.io/llvm-premerge-checks/agent-windows-jenkins:latest -docker run -it -v D:\:C:\ws gcr.io/llvm-premerge-checks/agent-windows-jenkins:latest \ No newline at end of file +docker run -it -v D:\:C:\ws -v E:\results:C:\results gcr.io/llvm-premerge-checks/agent-windows-jenkins:latest \ No newline at end of file