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

docker-cmd-file not working #817

Open
lazytesting opened this issue Feb 8, 2024 · 5 comments
Open

docker-cmd-file not working #817

lazytesting opened this issue Feb 8, 2024 · 5 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@lazytesting
Copy link

lazytesting commented Feb 8, 2024

This issue is maybe related to #794 but that one does not contains a solution and I still got a stable reproduction scenario.

  1. In the action config file I set:
 with:
          docker-cmd-file: example/entrypoint.sh
  1. In the logs I see
/usr/bin/docker run --env LOG_LEVEL --env RENOVATE_TOKEN=*** --env RENOVATE_CONFIG_FILE=/github-action/renovate-config.js --volume /home/runner/work/test-renovate/test-renovate/example/renovate-config.js:/github-action/renovate-config.js --volume /home/runner/work/test-renovate/test-renovate/example/entrypoint.sh:/entrypoint.sh --user root --volume /tmp:/tmp --rm ghcr.io/renovatebot/renovate:37.175.3 /entrypoint.sh
...some unrelevant log lines...
DEBUG: CLI config "config": {"repositories": ["/entrypoint.sh"]}
  1. It seems that the /entrypoint.sh argument for docker run is not running the custom entrypoints script
  2. I think renovate gets called with this argument, like this:
renovate /entrypoint.sh

this would explain why it sees a cli config with this value als repositories at least.

I took the examples from this project and stripped it down to a minimal reproduction path.
code: https://github.com/lazytesting/test-renovate
action run: https://github.com/lazytesting/test-renovate/actions/runs/7829422258/job/21361374380

The strange thing is that it seems to work in the e2e test github action of this project but I cannot see the difference.

@viceice viceice added the bug Something isn't working label Feb 8, 2024
@viceice
Copy link
Member

viceice commented Feb 8, 2024

I'm pretty sure it this test which fails: https://github.com/renovatebot/docker-renovate/blob/e0c1bdc511c5c7e912f2b45a669be07447e52cdd/bin/docker-entrypoint.sh#L13

This needs a community contribution to fix, because we don't use this.

@lazytesting
Copy link
Author

Happy to contribute but I lack a bit of context. What I don't understand is why that file gets called, I would expect that it gets overriden with the docker-cmd-file setting or do I miss something?

@viceice
Copy link
Member

viceice commented Feb 8, 2024

I don't really know whats going wrong, but here is a working example on our ci

docker-cmd-file: example/entrypoint.sh

@viceice viceice closed this as completed Feb 8, 2024
@viceice viceice reopened this Feb 8, 2024
@lazytesting
Copy link
Author

Finally found it... it was the execution permission after all. I did set them but not in the correct way...

If you like it, I with the following changes:

  • add the executable part to the documentation
  • add a validation that the file is executable

@viceice
Copy link
Member

viceice commented Feb 9, 2024

sure, go ahead

@viceice viceice added documentation Improvements or additions to documentation enhancement New feature or request and removed bug Something isn't working labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants