Unverified Commit 3f901068 authored by Derek Nola's avatar Derek Nola Committed by GitHub

Add alternate scripts location (#5692)

parent e6009b1e
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment