1
0
Fork 0

changed the way sccache is started

This commit is contained in:
Christian Kühnel 2020-04-24 09:54:29 +00:00
parent 7a87f7d453
commit 8039b8a6f7
5 changed files with 18 additions and 5 deletions

View file

@ -23,4 +23,4 @@ VOLUME C:\Temp
# start swarm plugin # start swarm plugin
COPY start_agent.ps1 c:\jenkins COPY start_agent.ps1 c:\jenkins
ENTRYPOINT ["C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "-arch=amd64", "-host_arch=amd64", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass", "C:\\jenkins\\start_agent.ps1"] CMD ["C:\\jenkins\\start_agent.ps1"]

View file

@ -25,9 +25,24 @@ Copy-Item "C:\credentials\.boto" "C:\Users\ContainerAdministrator\.boto"
$env:TEMP="${$AGENT_ROOT}\TEMP" $env:TEMP="${$AGENT_ROOT}\TEMP"
$env:TMP="${env:TEMP}" $env:TMP="${env:TEMP}"
# set local cache folder for sccache
$env:SCCACHE_DIR="C:\ws\sccache"
# Start sccache server and keep it running to avoid problems with Jenkins
# https://github.com/mozilla/sccache/blob/master/docs/Jenkins.md
$env:SCCACHE_IDLE_TIMEOUT="0"
# wipe cache at startup, otherwise it will time out
Remove-Item -Recurse -Force $env:SCCACHE_DIR
sccache --start-server
if ($lastexitcode -ne 0) {
Write-Error "Failed to start sccache server."
exit $lastexitcode
}
# start Jenkins agent
java -jar ${env:SWARM_PLUGIN_JAR} ` java -jar ${env:SWARM_PLUGIN_JAR} `
-master http://${JENKINS_SERVER}:8080 ` -master http://${JENKINS_SERVER}:8080 `
-executors 1 ` -executors 1 `
-fsroot ${AGENT_ROOT} ` -fsroot ${AGENT_ROOT} `
-labels "windows vs2019" ` -labels "windows vs2019 cores_${env:NUMBER_OF_PROCESSORS}" `
-name ${env:PARENT_HOSTNAME} -name ${env:PARENT_HOSTNAME}

View file

@ -38,8 +38,6 @@ RUN choco install -y cmake --version 3.15.4
RUN choco install -y python3 RUN choco install -y python3
RUN choco install -y gnuwin RUN choco install -y gnuwin
RUN choco install -y sccache RUN choco install -y sccache
# set local cache folder for sccache
ENV SCCACHE_DIR=C:\ws\sccache
RUN pip install psutil RUN pip install psutil
# install python dependencies for the scripts # install python dependencies for the scripts