Skip to content

Commit

Permalink
Bump the aws base image to 20H2 (#286)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-richardson authored Jul 27, 2021
1 parent 314435a commit 0c9a963
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build-aws.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ if (Test-AppExists "chmod") {
}

Write-Output "Adding vagrant box"
vagrant box add OctopusDeploy/dsc-test-server-windows-server-1909 https://s3-ap-southeast-2.amazonaws.com/octopus-vagrant-boxes/vagrant/json/OctopusDeploy/amazon-ebs/dsc-test-server-windows-server-1909.json --force
vagrant box add OctopusDeploy/dsc-test-server-windows-server-20H2 https://s3-ap-southeast-2.amazonaws.com/octopus-vagrant-boxes/vagrant/json/OctopusDeploy/amazon-ebs/dsc-test-server-windows-server-20H2.json --force

Write-Output "Ensuring vagrant box is latest"
vagrant box update --box OctopusDeploy/dsc-test-server-windows-server-1909 --provider aws
vagrant box update --box OctopusDeploy/dsc-test-server-windows-server-20H2 --provider aws

$splat = @{
provider="aws";
Expand Down
8 changes: 7 additions & 1 deletion cleanup-aws.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ $keyName = $files[0].BaseName
$env:KEY_NAME = $keyName
Write-Output "Using key pair $keyName.pem"

# this is a global action, so it doesn't get saved outside of the docker container when running
Write-Output "Adding vagrant box"
vagrant box add OctopusDeploy/dsc-test-server-windows-server-20H2 https://s3-ap-southeast-2.amazonaws.com/octopus-vagrant-boxes/vagrant/json/OctopusDeploy/amazon-ebs/dsc-test-server-windows-server-20H2.json --force
Write-Output "Ensuring vagrant box is latest"
vagrant box update --box OctopusDeploy/dsc-test-server-windows-server-20H2 --provider aws

#todo: check vagrant status and exit cleanly if not running

Write-Output "Running 'vagrant destroy -f'"
Expand All @@ -53,4 +59,4 @@ if ($VagrantDestroyExitCode -ne 0) {
Write-Output "##teamcity[buildStatus text='{build.status.text}. Vagrant cleanup failed. Action required.']"

exit $VagrantDestroyExitCode
}
}
2 changes: 1 addition & 1 deletion vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ Vagrant.configure(VAGRANT_FILE_API_VERSION) do |config|
aws.subnet_id = aws_subnet_id
aws.associate_public_ip = true
aws.user_data = File.read("Tests/aws_user_data.ps1")
override.vm.box = "OctopusDeploy/dsc-test-server-windows-server-1909" #box added via launcher script
override.vm.box = "OctopusDeploy/dsc-test-server-windows-server-20H2" #box added via launcher script
override.ssh.private_key_path = "./#{aws_key_name}.pem"
override.winrm.username = "Administrator"
override.winrm.timeout = 180
Expand Down

0 comments on commit 0c9a963

Please sign in to comment.