Skip to content

Commit c0fa6c4

Browse files
committed
vagrant setup for a windows build environment
1 parent fb8d15b commit c0fa6c4

5 files changed

+82
-0
lines changed

contrib/windows/Vagrantfile

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
6+
config.vm.guest = :windows
7+
config.vm.hostname = 'windows-jdeb'
8+
config.vm.box = "talisker/windows10pro"
9+
# download from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
10+
# config.vm.box_url = "file:///Users/tcurdt/Vagrant/IE11 - Win7.box"
11+
# config.vm.box = "Microsoft/EdgeOnWindows10"
12+
# config.vm.box_version = "1.0"
13+
# config.vm.box = "sbrumley/windows10"
14+
# config.vm.box_version = "10.0"
15+
16+
config.vm.network :private_network, type: "dhcp"
17+
18+
config.vm.provider "virtualbox" do |vb|
19+
vb.gui = true
20+
vb.name = "windows-jdeb"
21+
vb.memory = "1536"
22+
end
23+
24+
# config.vm.communicator = :winrm
25+
# config.winrm.username = "vagrant"
26+
# config.winrm.password = "vagrant"
27+
# config.vm.boot_timeout = 600
28+
# config.vm.graceful_halt_timeout = 600
29+
# config.ssh.username = "IEUser"
30+
# config.ssh.password = "Passw0rd!"
31+
# config.ssh.insert_key = false
32+
33+
# config.vm.provision :shell,
34+
# inline: "echo TEST",
35+
# privileged: false
36+
37+
# config.vm.provision :shell,
38+
# path: "provision-chocolatey.ps1",
39+
# privileged: false
40+
41+
config.vm.provision :shell,
42+
path: "provision-bootstrap.cmd"
43+
44+
config.vm.provision :shell,
45+
path: "provision-packages.cmd"
46+
47+
config.vm.provision :shell,
48+
path: "provision-checkout.cmd"
49+
50+
end
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$InstallPath = "$env:C:\ProgramData\Chocolatey\bin"
2+
3+
$EnvPath = $env:PATH
4+
if (!$EnvPath.ToLower().Contains($InstallPath.ToLower())) {
5+
6+
Write-Host "Adding path to `'$InstallPath`'"
7+
8+
$ActualPath = [Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine)
9+
$Delimiter = ";"
10+
$HasDelimiter = $ActualPath -ne $null -and $ActualPath.EndsWith($Delimiter)
11+
If (!$HasDelimiter -and $ActualPath -ne $null) {$InstallPath = $Delimiter + $InstallPath}
12+
if (!$InstallPath.EndsWith($Delimiter)) {$InstallPath += $Delimiter}
13+
14+
[Environment]::SetEnvironmentVariable('Path', $ActualPath + $InstallPath, [System.EnvironmentVariableTarget]::Machine)
15+
}
16+
17+
$env:Path += ";$InstallPath"
18+
19+
if (!(Test-Path $InstallPath)) {
20+
Write-Host "Installing Chocolatey"
21+
iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))
22+
Write-Host "Done!"
23+
}
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@powershell -NoProfile -ExecutionPolicy Bypass -File "c:\vagrant\install-chocolatey.ps1"
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
C:
2+
IF EXIST C:\Users\vagrant\Desktop\jdeb GOTO NOCHECKOUT
3+
CD C:\Users\vagrant\Desktop
4+
git clone https://github.com/tcurdt/jdeb.git
5+
:NOCHECKOUT
6+
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
choco install -y git -params '"/GitAndUnixToolsOnPath"'
2+
choco install -y jdk8 maven

0 commit comments

Comments
 (0)