Skip to content

Action does not work on AWS CodeBuild self-hosted Github runners when helm is invoked from Python script #82

@corneliusroemer

Description

@corneliusroemer

I've tried to use this action on an AWS CodeBuild self-hosted Github runner.

It works like this:

- name: Test helm template
        uses: WyriHaximus/github-action-helm3@v4
        with:
          exec: helm template does-not-matter ./kubernetes/xyz > defaultTemplate.yaml

but not when helm is invoked by a python script:

 - name: Deploy with helm
        uses: WyriHaximus/github-action-helm3@v4
        with:
          exec: ./deploy.py --verbose helm --branch ${{ github.ref_name }} --sha ${{ github.sha }}

this fails with:

Traceback (most recent call last):
  File "/codebuild/output/src3554363593/src/actions-runner/_work/x/x/./deploy.py", line 225, in <module>
    main()
  File "/codebuild/output/src3554363593/src/actions-runner/_work/x/x/./deploy.py", line 79, in main
    handle_helm()
  File "/codebuild/output/src3554363593/src/actions-runner/_work/x/x/./deploy.py", line [16](https://github.com/x-project/x/actions/runs/8853717181/job/24315537008#step:7:17)6, in handle_helm
    run_command(parameters)
  File "/codebuild/output/src3554363593/src/actions-runner/_work/x/x/./deploy.py", line 69, in run_command
    output =  subprocess.run(command, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pyenv/versions/3.11.8/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pyenv/versions/3.11.8/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/root/.pyenv/versions/3.11.8/lib/python3.11/subprocess.py", line [19](https://github.com/x-project/x/actions/runs/8853717181/job/24315537008#step:7:20)53, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'helm'

Invoking helm from a Python script works fine using the normal Github actions. Not sure why it doesn't on AWS runners.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions