1
0
Fork 0
llvm-premerge-checks/containers/agent-windows-buildkite/Dockerfile
ChristianKuehnel de34fb9572
Create docker container for Windows build (#52)
* first steps towards windows builds #25

* added build scripts for windows

* moved from powershell to CMD

* script cleanup

* set up jenkins swarm plugin

* added deployment script for windows

* first draft of jenkins file for windows

* first shot at windows pods

* first draft for buildkite agent

* added call to run_cmake.bat

* added call to run_ninja.bat

* added new buildkite script

* added Dockerfile for buildkite agent

* fixed userprofile path

* added /IncludeOptional for VS

I hope that includes all required libraries

* moved work folder to W:

* added git config for long file names

* added more CMake flags

* setting x64 bit arch in a different way

* and yet another way to set 64bit

* merged buildkite changes to jenkins scripts

* hiding license in batch script runs

* running release build

* added test xml log

* compilation is working, but not all tests

* cmake is in patch now

* updated the dependencies from buildkite config

* dockerfile cleanup

* change how git handles line endings

* updated comment

* performance improvment for volume

* changed workdir folder

* using gnuwin package

split installation into separate layers to speed up incremental changes
2019-11-26 17:10:30 +01:00

56 lines
No EOL
2.2 KiB
Docker

# escape=`
# use windows server core image
ARG version=ltsc2019
FROM mcr.microsoft.com/windows/servercore:$version
# install chocolately as package manager
RUN powershell -Command `
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) ; `
choco feature disable --name showDownloadProgress
# install Visual Studio build tools
RUN powershell -NoProfile -InputFormat None -Command `
choco install visualcpp-build-tools `
--version 15.0.26228.20170424 -y --params "'/IncludeOptional'" ;`
Write-Host 'Waiting for Visual C++ Build Tools to finish'; `
Wait-Process -Name vs_installer
# install other tools as described in https://llvm.org/docs/GettingStartedVS.html
# and a few more that were not documented...
RUN choco install -y git & `
choco install -y cmake --version 3.15.4 & `
choco install -y python2 & `
choco install -y gnuwin32-coreutils.install & `
choco install -y ninja & `
choco install -y grep & `
choco install -y sed & `
choco install -y diffutils
RUN pip install psutil
# configure Python encoding
ENV PYTHONIOENCODING=UTF-8
# update the path variable
RUN powershell.exe -Command $path = $env:path + ';c:\Program Files (x86)\GnuWin32\bin;C:\Program Files\CMake\bin'; Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path
# use this drive to store the worksapce'
VOLUME W:
# install buildkite agent as described in the documentation
# https://buildkite.com/docs/agent/v3/windows
# Supply your agent token via the arguement "-token <mytoken" when building the image
ARG token
ENV buildkiteAgentToken="${token}"
ENV BUILDKITE_BUILD_PATH=W:\buildkite
ENV BUILDKITE_AGENT_NAME=amd64-windows-visualstudio2017
RUN powershell -NoProfile -InputFormat None -Command `
Set-ExecutionPolicy Bypass -Scope Process -Force ; `
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/buildkite/agent/master/install.ps1'))
# support long file names and do not change line endings
RUN git config --system core.longpaths true & `
git config --global core.autocrlf false
CMD "C:\buildkite-agent\bin\buildkite-agent.exe" start