From c40faf56bfad4fd47d8aee64f4371a26c41fa7eb Mon Sep 17 00:00:00 2001 From: Shamil Mubarakshin <127750046+shamil-mubarakshin@users.noreply.github.com> Date: Wed, 10 Jan 2024 10:41:11 +0100 Subject: [PATCH] [ubuntu] Fix static path in install.sh (#9138) --- images/ubuntu/scripts/helpers/install.sh | 2 +- images/ubuntu/templates/ubuntu-20.04.pkr.hcl | 2 +- images/ubuntu/templates/ubuntu-22.04.pkr.hcl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/ubuntu/scripts/helpers/install.sh b/images/ubuntu/scripts/helpers/install.sh index 626e06f73..da954560a 100644 --- a/images/ubuntu/scripts/helpers/install.sh +++ b/images/ubuntu/scripts/helpers/install.sh @@ -46,7 +46,7 @@ download_with_retry() { } get_toolset_value() { - local toolset_path="/imagegeneration/installers/toolset.json" + local toolset_path="${INSTALLER_SCRIPT_FOLDER}/toolset.json" local query=$1 echo "$(jq -r "$query" $toolset_path)" diff --git a/images/ubuntu/templates/ubuntu-20.04.pkr.hcl b/images/ubuntu/templates/ubuntu-20.04.pkr.hcl index 85b3c5385..7a35f657a 100644 --- a/images/ubuntu/templates/ubuntu-20.04.pkr.hcl +++ b/images/ubuntu/templates/ubuntu-20.04.pkr.hcl @@ -259,7 +259,7 @@ build { } provisioner "shell" { - environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}"] + environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" scripts = ["${path.root}/../scripts/build/install-powershell.sh"] } diff --git a/images/ubuntu/templates/ubuntu-22.04.pkr.hcl b/images/ubuntu/templates/ubuntu-22.04.pkr.hcl index 58c8d7c54..25fce43fd 100644 --- a/images/ubuntu/templates/ubuntu-22.04.pkr.hcl +++ b/images/ubuntu/templates/ubuntu-22.04.pkr.hcl @@ -259,7 +259,7 @@ build { } provisioner "shell" { - environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}"] + environment_vars = ["HELPER_SCRIPTS=${var.helper_script_folder}", "INSTALLER_SCRIPT_FOLDER=${var.installer_script_folder}"] execute_command = "sudo sh -c '{{ .Vars }} {{ .Path }}'" scripts = ["${path.root}/../scripts/build/install-powershell.sh"] }