Switch to msys preinstalled in Windows image. Change-Id: I67f8f4a9314dcec977b9099fa9acdedf72af26a5
diff --git a/gce/jenkins-slave-windows.ps1 b/gce/jenkins-slave-windows.ps1 index 5666b6f..e5870bc 100644 --- a/gce/jenkins-slave-windows.ps1 +++ b/gce/jenkins-slave-windows.ps1
@@ -10,12 +10,26 @@ # Install Chocolatey Invoke-Expression ((New-Object Net.WebClient).DownloadString("https://chocolatey.org/install.ps1")) +# Initialize msys +$msysRoot='c:\tools\msys64\' + +# Finally initialize and upgrade MSYS2 according to https://msys2.github.io +Write-Host "Initializing MSYS2..." +$msysShell = Join-Path $msysRoot msys2_shell.bat +Start-Process -Wait $msysShell -ArgumentList '-c', exit + +$command = 'pacman --noconfirm --needed -Sy bash pacman pacman-mirrors msys2-runtime' +Write-Host "Updating system packages with '$command'..." +Start-Process -Wait $msysShell -ArgumentList '-c', "'$command'" + +$command = 'pacman --noconfirm -Su' +Write-Host "Upgrading full system with '$command'..." +Start-Process -Wait $msysShell -ArgumentList '-c', "'$command'" + # Install all the Windows software we need: -# - msys2 because Bazel currently depends on it -# - JDK, because, well, Bazel is written in Java +# - JDK, because, Bazel is written in Java # - NSSM, because that's the easiest way to create services # - Chrome, because the default IE setup is way too crippled by security measures -& choco install msys2 -y & choco install nssm -y & choco install jdk8 -y & choco install googlechrome -y
diff --git a/gce/vm.sh b/gce/vm.sh index 19a8a10..48c6974 100755 --- a/gce/vm.sh +++ b/gce/vm.sh
@@ -42,8 +42,8 @@ "ubuntu-15-10-slave-4 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1510-wily-v20151026 ubuntu_15.10-x86_64-4 europe-west1-c startup-script=jenkins-slave.sh ubuntu-15-10-slave.sh linux-android.sh cleanup-install.sh" "ubuntu-docker-slave-1 https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1510-wily-v20151026 ubuntu_15.10-x86_64-docker-1 us-east1-c startup-script=jenkins-slave.sh ubuntu-15-10-slave.sh ubuntu-15-10-docker.sh linux-android.sh cleanup-install.sh" # Fow Windows, we use a custom image with pre-installed MSVC. - "windows-slave-1 /bazel-public/windows-server-2012-r2-dc-v20160112-vs2015-cpp-python windows-x86_64-1 europe-west1-c windows-startup-script-ps1=jenkins-slave-windows.ps1" - "windows-slave-2 /bazel-public/windows-server-2012-r2-dc-v20160112-vs2015-cpp-python windows-x86_64-2 europe-west1-c windows-startup-script-ps1=jenkins-slave-windows.ps1" + "windows-slave-1 /bazel-public/windows-server-2012-r2-dc-v20160112-vs2015-cpp-python-msys windows-x86_64-1 europe-west1-c windows-startup-script-ps1=jenkins-slave-windows.ps1" + "windows-slave-2 /bazel-public/windows-server-2012-r2-dc-v20160112-vs2015-cpp-python-msys windows-x86_64-2 europe-west1-c windows-startup-script-ps1=jenkins-slave-windows.ps1" ) cd "$(dirname "${BASH_SOURCE[0]}")"