Closed mmisztal1980 closed 6 years ago
Helm by default writes this information to ~/.helm/repository/repositories.yaml. This directory is likely restricted on the shared build agents. The Helm client will respect the HELM_HOME environment variable so try setting this to a location that is accessible (such as $(System.DefaultWorkingDirectory)). Keep in mind that this state will likely not persist between builds.
Hi,
I've added a preceeding bash step, which would export HELM_HOME=$(System.DefaultWorkingDirectory)
however the error persists.
Either I'm doing something wrong, or this issue is not related to HELM_HOME (I've got a preceeding helm init step and it works fine - for what it's worth).
I've modified the bash task to do the following:
Task Inline Bash
# Write your commands here
export HELM_HOME=$(System.DefaultWorkingDirectory)
echo $HELM_HOME
ls -l $(System.DefaultWorkingDirectory)
Output
2018-04-15T18:54:38.1611180Z ##[section]Starting: [bash] export HELM_HOME
2018-04-15T18:54:38.2283250Z ==============================================================================
2018-04-15T18:54:38.2426790Z Task : Bash
2018-04-15T18:54:38.2561120Z Description : This is an early preview. Run a Bash script on macOS, Linux, or Windows
2018-04-15T18:54:38.2696980Z Version : 3.127.0
2018-04-15T18:54:38.2846320Z Author : Microsoft Corporation
2018-04-15T18:54:38.2996680Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613738)
2018-04-15T18:54:38.3141000Z ==============================================================================
2018-04-15T18:54:40.5831890Z Generating script.
2018-04-15T18:54:40.8053540Z [command]/bin/bash --noprofile --norc /Users/vsts/agent/2.131.0/work/_temp/569cb774-0be0-487c-8e1f-b6cc3c1d7ad1.sh
2018-04-15T18:54:40.8224150Z /Users/vsts/agent/2.131.0/work/r1/a
2018-04-15T18:54:40.8355800Z total 0
2018-04-15T18:54:40.8526740Z drwxr-xr-x 9 vsts staff 306 Apr 15 18:53 inf-k8s-services
2018-04-15T18:54:40.8735460Z drwxr-xr-x 6 vsts staff 204 Apr 15 18:53 undefined
2018-04-15T18:54:40.9278630Z ##[section]Finishing: [bash] export HELM_HOME
What catches my eye is the undefined directory in the $HELM_HOME
, it also appears in the original error message : undefined/repository/cache/undefined/repository/cache/rook-master-index.yaml: no such file or directory
. Are you sure it's not coming from the extension's transpiled .ts code?
Worth noting too that Helm home directory can also be configured with the "--home" global flag.
Let me try that
@debben providing HELM_HOME via the --home
flag seems to have solved the issue.
Thanks!
Note: for support questions specific to Helm, please use see the Helm documentation. This repository's issues are reserved for feature requests and bug reports.
I'm submitting a ...
Do you want to request a feature or report a bug? bug
What is the current behavior?
If the current behavior is a bug, please provide parameters either in plain text or with a screenshot
command: repo
params: add rook-master https://charts.rook.io/master
What is the expected behavior? I'm expecting this tu succeed the same way it would from my cmdline
What is the motivation / use case for changing the behavior? Keeps failing, where it shouldn't
Please tell us about your environment and the type of VSTS agent pool you're running the Helm task in:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)