0

I'm trying to build an image with PMD to use in a runner with a project. I was planning to have PMD run a code analysis before the build and test steps.

For that, I tried to set an alias for PMD using echo and writing to .bashrc at the end of the Dockerfile using RUN. Then I upload the image to the GitLab registry and commit something in the repository so the build starts. I keep getting the error "pmd: command not found", and I don't know why since I set the alias when the image was built.

I know there is a way to build the image with it, and make it available for GitLab to run in a simple way, but I can't find how. Is there some configuration on the Dockerfile that I can use to persist an alias for the CI runner?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.