From 3f9010683e5758ce2aed9b5d3495655aefa34649 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Tue, 14 Jun 2022 17:50:11 -0700 Subject: [PATCH] Add alternate scripts location (#5692) Signed-off-by: Derek Nola --- tests/e2e/vagrantdefaults.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/vagrantdefaults.rb b/tests/e2e/vagrantdefaults.rb index 9bbc91192e..3f4064f026 100644 --- a/tests/e2e/vagrantdefaults.rb +++ b/tests/e2e/vagrantdefaults.rb @@ -19,9 +19,10 @@ def getInstallType(vm, release_version, branch) elsif !release_version.empty? return "INSTALL_K3S_VERSION=#{release_version}" else + scripts_location = Dir.exists?("./scripts") ? "./scripts" : "../scripts" # Grabs the last 5 commit SHA's from the given branch, then purges any commits that do not have a passing CI build # MicroOS requires it not be in a /tmp/ or other root system folder - vm.provision "Get latest commit", type: "shell", path: "../scripts/latest_commit.sh", args: [branch, "/tmp/k3s_commits"] + vm.provision "Get latest commit", type: "shell", path: scripts_location +"/latest_commit.sh", args: [branch, "/tmp/k3s_commits"] return "INSTALL_K3S_COMMIT=$(head\ -n\ 1\ /tmp/k3s_commits)" end end \ No newline at end of file