-
Notifications
You must be signed in to change notification settings - Fork 9
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
Does not work with GitLab CI #14
Comments
@Jamesking56 how does GitLab invoke it? Are you able to see the full run command? |
Gitlab checks out the code repository inside a directory in /builds/<namespace>/<project name> and tries to cd into it. From there it'll try to run the so given this config:
gitlab starts a docker container, checks out the code as mentioned above, tries to cd to the code directory and that is where it fails. |
stages:
- lint
ansible-linter:
image: cytopia/ansible-lint
stage: lint
tags: ['generic']
script:
- echo $PATH
- pwd
- which ansible-lint
- ansible-lint inventories/bootstrap.yml
- ansible-lint inventories/configure.yml Given the preceding gitlab-ci file, we still get the missing WARNING: Couldn't open sh - No such file or directory
WARNING: Couldn't open sh - No such file or directory I looked through the linked issues #17 and #18 but I don't quite see how they relate to this issue? |
I have the same issue, running in gitlab too. |
I made it work by specifying an entrypoint:
|
Thanks @ndegory Is this also working for @Jamesking56 , @DutchessNicole and @xmariopereira ? Might also be related: cytopia/docker-yamllint#14 |
Can confirm setting the entrypoint works 👍 |
I will add this to the README |
Thanks everyone for figuring this out :) |
FWIW - gitlab ci only requires an empty entrypoint. You can just use:
And it'll work fine. |
Trying to use this on GitLab CI:
.gitlab-ci.yml
Output from GitLab CI:
The text was updated successfully, but these errors were encountered: