Skip to content

Commit a8a45f2

Browse files
committed
Add some logging for missing helm exe during acquisition
Fixes: OctopusDeploy/Issues#5057
1 parent 5958e03 commit a8a45f2

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

source/Calamari.Shared/Integration/Packages/Download/Scripts/HelmFetch.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#Ideally this single line would replace everything below ... But there appears to be a bug somewhere
22
#helm fetch --repo $Url --username $Username --password $Password --version $version --destination $TempStaging $package
33

4+
if (!$(Get-Command helm -errorAction SilentlyContinue))
5+
{
6+
Write-Error "The helm client tool does not appear to be available on the current path.`nSee http://g.octopushq.com/HelmLimitations for more details."
7+
Exit 1
8+
}
9+
410
$TempHelmHome = $((Resolve-Path .\).Path) +"\helm"
511
$TempStaging = $((Resolve-Path .\).Path) +"\staging"
612

@@ -30,7 +36,4 @@ if(!$?) {
3036

3137
Write-Host "Fetching Chart"
3238
Write-Verbose "helm fetch --home $TempHelmHome --version $Version --destination $TempStaging $TempRepoName/$Package"
33-
helm fetch --home $TempHelmHome --version $Version --destination $TempStaging $TempRepoName/$Package
34-
35-
#$files=(Get-ChildItem "$TempStaging/*");
36-
#Set-OctopusVariable -name "PackageFile" -value $files[0].FullName;
39+
helm fetch --home $TempHelmHome --version $Version --destination $TempStaging $TempRepoName/$Package

source/Calamari.Shared/Integration/Packages/Download/Scripts/helmFetch.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
1+
command -v "helm" &>/dev/null
2+
if [[ $? != 0 ]]; then
3+
echo >&2 "The helm client tool does not appear to be available on the current path. See http://g.octopushq.com/HelmLimitations for more details."
4+
deps=1;
5+
fi
6+
27
username=$(get_octopusvariable "Username")
38
password=$(get_octopusvariable "Password")
49
url=$(get_octopusvariable "Url")

0 commit comments

Comments
 (0)