mamezou-tech / setup-helmfile

Setup helmfile action
MIT License
41 stars 20 forks source link

Unable to locate executable file: helm #38

Closed parrotchute closed 2 years ago

parrotchute commented 2 years ago

Expected behaviour Installation of helm plugins work when running setup-helmfile in self-hosted Github runners without helm already installed.

Actual behaviour Set up fails on helm plugins install step with Error: Unable to locate executable file: helm.

Run mamezou-tech/setup-helmfile@v0.9.0
  with:
    helmfile-version: v0.144.0
    kubectl-version: 1.21.2
    kubectl-release-date: 2021-07-05
    helm-version: v3.7.1
    install-kubectl: yes
    install-helm: yes
    install-helm-plugins: yes
    helm-diff-plugin-version: master
    helm-s3-plugin-version: master
Downloading from : https://amazon-eks.s3-us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl
Downloading from : https://get.helm.sh/helm-v3.7.1-linux-amd64.tar.gz
Downloading from : https://github.com/roboll/helmfile/releases/download/v0.144.0/helmfile_linux_amd64
(node:249) UnhandledPromiseRejectionWarning: Error: Unable to locate executable file: helm. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
    at Object.<anonymous> (/runner/_work/_actions/mamezou-tech/setup-helmfile/v0.9.0/dist/index.js:268:27)
    at Generator.next (<anonymous>)
    at fulfilled (/runner/_work/_actions/mamezou-tech/setup-helmfile/v0.9.0/dist/index.js:79:58)
(node:249) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:249) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Finish downloading. : /runner/_work/_temp/e5bcdc56-8547-41c1-be65-7cbc45b18fef
/usr/bin/tar xz --warning=no-unknown-keyword --overwrite -C /runner/_work/_temp/926b2d24-ed5e-49c2-a72e-a59d0262591f -f /runner/_work/_temp/e5bcdc56-8547-41c1-be65-7cbc45b18fef
/runner/_work/_temp/926b2d24-ed5e-49c2-a72e-a59d0262591f
Finish downloading. : /runner/_work/_temp/30a0c3c7-81d1-4314-bc22-08c0659dd346
/usr/bin/chmod +x /home/runner/bin/helm
/usr/bin/chmod +x /home/runner/bin/helmfile
Finish downloading. : /runner/_work/_temp/c72eccc7-b06f-45ae-81b1-b68918cd5bc5
/usr/bin/chmod +x /home/runner/bin/kubectl

Steps to reproduce the behaviour Set up helmfile on a self-hosted runner that does not already have helm installed.

    - name: Setup helmfile
      uses: mamezou-tech/setup-helmfile@v0.9.0
      with:
        helmfile-version: "v0.144.0"

Possible Root cause My guess is that all install steps are run asynchronously even though helm plugins require helm to be installed first. Github's own runners already come with helm installed and thus do not encounter this issue. For a runner without helm already installed, helm plugins install have to start after helm is installed by setup-helmfile.

Suggestion Adding await to the installHelm function solved the issue for me.

kondoumh commented 2 years ago

I couldn't consider the environment where helm was not installed. Thank you.