1
0
Fork 0
llvm-premerge-checks/containers/agent-windows-vs2019/Dockerfile

76 lines
3.3 KiB
Text
Raw Normal View History

Upgrade Windows agents to Visual Studio 2019 and sccache (#162) * added cmake parameters for sccache * added sccache * removed stray debug output * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * exclude for virus scan * added testing option this does not start the agent * write results on failures * added timeouts for pipelines * moving master pipelines to python scripts * added flang to automatic project selection based on #159, this will enable flang for beta testers * added persistent workspace for testing containers * added secure delete function * added better log message * deleting read-only files * checking existence before setting flags * using unlink * deleting recursively * using pathlib for chmod * using custom workspace * fixed drive * separate handling of single files * simplified read-only handling again * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * added cmake parameters for sccache * added sccache * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * removed sccache from vs2017 * making windows image configurable * added versioning * created windows BETA pipeline * added Jenkins label for vs2019
2020-04-21 11:46:41 +02:00
# escape=`
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]
# Download the Build Tools bootstrapper.
ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe
# Download channel for fixed install.
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel
ADD ${CHANNEL_URL} C:\TEMP\VisualStudio.chman
# Install Build Tools with C++ workload.
# - Documentation for docker installation
# https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2019
# - Documentation on workloads
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools?view=vs-2019#c-build-tools
# - Documentation on flags
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio?view=vs-2019
RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
--channelUri C:\TEMP\VisualStudio.chman `
--installChannelUri C:\TEMP\VisualStudio.chman `
--installPath C:\BuildTools `
--add Microsoft.VisualStudio.Workload.VCTools `
--add Microsoft.VisualStudio.Component.VC.ATL `
--includeRecommended `
Upgrade Windows agents to Visual Studio 2019 and sccache (#162) * added cmake parameters for sccache * added sccache * removed stray debug output * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * exclude for virus scan * added testing option this does not start the agent * write results on failures * added timeouts for pipelines * moving master pipelines to python scripts * added flang to automatic project selection based on #159, this will enable flang for beta testers * added persistent workspace for testing containers * added secure delete function * added better log message * deleting read-only files * checking existence before setting flags * using unlink * deleting recursively * using pathlib for chmod * using custom workspace * fixed drive * separate handling of single files * simplified read-only handling again * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * added cmake parameters for sccache * added sccache * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * removed sccache from vs2017 * making windows image configurable * added versioning * created windows BETA pipeline * added Jenkins label for vs2019
2020-04-21 11:46:41 +02:00
|| IF "%ERRORLEVEL%"=="3010" EXIT 0
2020-07-31 10:43:33 +02:00
# Register DIA dll (Debug Interface Access) so it can be used to symbolize
# the stack traces. Register dll for 32 and 64 bit.
# see https://developercommunity.visualstudio.com/content/problem/290674/msdia140dll-is-not-registered-on-vs2017-hosts.html
RUN regsvr32 /S "C:\BuildTools\DIA SDK\bin\amd64\msdia140.dll" & `
regsvr32 /S "C:\BuildTools\DIA SDK\bin\msdia140.dll"
Upgrade Windows agents to Visual Studio 2019 and sccache (#162) * added cmake parameters for sccache * added sccache * removed stray debug output * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * exclude for virus scan * added testing option this does not start the agent * write results on failures * added timeouts for pipelines * moving master pipelines to python scripts * added flang to automatic project selection based on #159, this will enable flang for beta testers * added persistent workspace for testing containers * added secure delete function * added better log message * deleting read-only files * checking existence before setting flags * using unlink * deleting recursively * using pathlib for chmod * using custom workspace * fixed drive * separate handling of single files * simplified read-only handling again * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * added cmake parameters for sccache * added sccache * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * removed sccache from vs2017 * making windows image configurable * added versioning * created windows BETA pipeline * added Jenkins label for vs2019
2020-04-21 11:46:41 +02:00
# install chocolately as package manager
RUN powershell -NoProfile -InputFormat None -Command `
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) ; `
choco feature disable --name showDownloadProgress
# install tools as described in https://llvm.org/docs/GettingStartedVS.html
# and a few more that were not documented...
RUN choco install -y ninja git python3
RUN choco install -y activeperl --version 5.24.3.2404001
# libcxx requires clang(-cl) to be available
RUN choco install -y sccache llvm
Upgrade Windows agents to Visual Studio 2019 and sccache (#162) * added cmake parameters for sccache * added sccache * removed stray debug output * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * exclude for virus scan * added testing option this does not start the agent * write results on failures * added timeouts for pipelines * moving master pipelines to python scripts * added flang to automatic project selection based on #159, this will enable flang for beta testers * added persistent workspace for testing containers * added secure delete function * added better log message * deleting read-only files * checking existence before setting flags * using unlink * deleting recursively * using pathlib for chmod * using custom workspace * fixed drive * separate handling of single files * simplified read-only handling again * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * added cmake parameters for sccache * added sccache * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * removed sccache from vs2017 * making windows image configurable * added versioning * created windows BETA pipeline * added Jenkins label for vs2019
2020-04-21 11:46:41 +02:00
RUN pip install psutil
# install python dependencies for the scripts
RUN pip install -r https://raw.githubusercontent.com/google/llvm-premerge-checks/main/scripts/requirements.txt
Upgrade Windows agents to Visual Studio 2019 and sccache (#162) * added cmake parameters for sccache * added sccache * removed stray debug output * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * exclude for virus scan * added testing option this does not start the agent * write results on failures * added timeouts for pipelines * moving master pipelines to python scripts * added flang to automatic project selection based on #159, this will enable flang for beta testers * added persistent workspace for testing containers * added secure delete function * added better log message * deleting read-only files * checking existence before setting flags * using unlink * deleting recursively * using pathlib for chmod * using custom workspace * fixed drive * separate handling of single files * simplified read-only handling again * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * added cmake parameters for sccache * added sccache * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * removed sccache from vs2017 * making windows image configurable * added versioning * created windows BETA pipeline * added Jenkins label for vs2019
2020-04-21 11:46:41 +02:00
# configure Python encoding
ENV PYTHONIOENCODING=UTF-8
# update the path variable
# C:\Program Files\Git\usr\bin contains a usable bash and other unix tools.
RUN powershell -Command `
[System.Environment]::SetEnvironmentVariable('PATH', `
[System.Environment]::GetEnvironmentVariable('PATH', 'machine') + ';C:\Program Files\Git\usr\bin', `
'machine')
Upgrade Windows agents to Visual Studio 2019 and sccache (#162) * added cmake parameters for sccache * added sccache * removed stray debug output * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * exclude for virus scan * added testing option this does not start the agent * write results on failures * added timeouts for pipelines * moving master pipelines to python scripts * added flang to automatic project selection based on #159, this will enable flang for beta testers * added persistent workspace for testing containers * added secure delete function * added better log message * deleting read-only files * checking existence before setting flags * using unlink * deleting recursively * using pathlib for chmod * using custom workspace * fixed drive * separate handling of single files * simplified read-only handling again * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * added cmake parameters for sccache * added sccache * starting sccache with VS environment * added container for Visual Studio 2019 * fixed comments * considering WIndows version * updated to vs2019 * using MS install method * snapshot of VS2019 experiments * using --installRecommended * cleanup of dockerfile * updated path * fixed dockerfile * dumped version number * removed vsdevcmd calls as it's already set in the docker Entrypoint * renamed container folders * windows version not needed any more * bumped version number * bumped version number * script cleanup * removed sccache from vs2017 * making windows image configurable * added versioning * created windows BETA pipeline * added Jenkins label for vs2019
2020-04-21 11:46:41 +02:00
# use this folder to store the worksapce'
VOLUME C:\ws
WORKDIR C:\ws
# support long file names during git checkout
RUN git config --system core.longpaths true & `
git config --global core.autocrlf false
# Define the entry point for the docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
2020-05-04 16:23:02 +02:00
#
# For running manually:
# C:\BuildTools\Common7\Tools\VsDevCmd.bat -arch=amd64 -host_arch=amd64
2020-04-23 13:50:31 +02:00
ENTRYPOINT ["C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "-arch=amd64", "-host_arch=amd64", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]