From ceb7831e508a0b36c397d7a914a2932a69d5efad Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Mon, 20 Jun 2022 18:40:42 +0200 Subject: [PATCH] [Packer] Fix anka packer template (#5778) * Fix anka packer template Fix indentation Use sources * Update boostrap path --- images/macos/templates/macOS-11.anka.pkr.hcl | 9 ++++++--- images/macos/templates/macOS-12.anka.pkr.hcl | 16 +++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/images/macos/templates/macOS-11.anka.pkr.hcl b/images/macos/templates/macOS-11.anka.pkr.hcl index c3f76512..2b17e98b 100644 --- a/images/macos/templates/macOS-11.anka.pkr.hcl +++ b/images/macos/templates/macOS-11.anka.pkr.hcl @@ -70,11 +70,11 @@ build { } provisioner "file" { destination = "image-generation/" - sources = [ + sources = [ "./provision/assets", "./tests", "./software-report", - "./helpers" + "./helpers" ] } provisioner "file" { @@ -213,7 +213,10 @@ build { execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}" } provisioner "shell" { - script = "./provision/core/toolset.ps1" + scripts = [ + "./provision/core/toolset.ps1", + "./provision/core/configure-toolset.ps1" + ] execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" } provisioner "shell" { diff --git a/images/macos/templates/macOS-12.anka.pkr.hcl b/images/macos/templates/macOS-12.anka.pkr.hcl index 26dd0693..e9ce7e65 100644 --- a/images/macos/templates/macOS-12.anka.pkr.hcl +++ b/images/macos/templates/macOS-12.anka.pkr.hcl @@ -64,15 +64,17 @@ build { "source.veertu-anka-vm-clone.template" ] provisioner "shell" { - inline = "mkdir ~/image-generation" + inline = [ + "mkdir ~/image-generation" + ] } provisioner "file" { - destination = "~/image-generation/" - source = [ + destination = "image-generation/" + sources = [ "./provision/assets", "./tests", "./software-report", - "./helpers" + "./helpers" ] } provisioner "file" { @@ -98,7 +100,7 @@ build { } provisioner "file" { destination = "bootstrap" - source = "./provision/bootstrap-provisioner" + source = "./provision/bootstrap-provisioner/" } provisioner "file" { destination = "image-generation/toolset.json" @@ -135,7 +137,7 @@ build { } provisioner "shell" { script = "./provision/core/reboot.sh" - execute_command = execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}" + execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; sudo {{ .Vars }} {{ .Path }}" expect_disconnect = true } provisioner "shell" { @@ -218,7 +220,7 @@ build { execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} pwsh -f {{ .Path }}" } provisioner "shell" { - scripts = "./provision/core/delete-duplicate-sims.rb" + script = "./provision/core/delete-duplicate-sims.rb" execute_command = "source $HOME/.bash_profile; ruby {{ .Path }}" } provisioner "shell" {