Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
corneliusroemer opened this issue Apr 26, 2024 · 1 comment

Comments

@corneliusroemer
Copy link
Contributor

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.

@WyriHaximus
Copy link
Owner

Interesting! Underwater helm is a bash alias. Should probably change that. Do have some ideas for that. Will get back to you on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants