I am trying to setup selenium web tests (python, headless mode) running in docker on bitbucket pipeline and get errors that I can't fix.
One of them is
docker: Error response from daemon: authorization denied by plugin pipelines: -v only supports $BITBUCKET_CLONE_DIR and its subdirectories. None of the solutions or workarounds found worked and I am not sure should I try to solve it or maybe my approach is wrong in general.
I wonder is there any detailed working up-to-date guide that could help me figure out how to properly set it up. What should my yml file and dockerfile look like, should I download and unzip chromedriver file? or should I stick to
Hello @elena_skorodilo and welcome to the Community!
The error you reported was because in the example you shared you are trying to mount the directory /dev/shm inside the container you starting with docker run. In pipelines, you can only mount directories from the build container to another container if the directory is under the $BITBUCKET_CLONE_DIR path.
So if the dev/shm is a folder in your repository, the mounting would be as follows:
docker run -d -p 4444:4444 -v $BITBUCKET_CLONE_DIR/dev/shm:/dev/shm selenium/standalone-chrome
This would mount the files contained in $BITBUCKET_CLONE_DIR/dev/shm directory in the build container, inside the /dev/shm directory of the container you are spinning up.
However, I found the following article with instructions on how to set-up the selenium tests using Bitbucket Services instead, which may be of help :
Although it's not Python-specific, it provides good information on how to define the service in the pipeline, the port mapping and the selenium configuration.
Hope that helps!
Thank you, @elena_skorodilo !
Patrik S
@Patrik S, your answer is EXTREMELY HELPFUL, with help of your explanation and provided article I managed to run my first test on a bitbucket pipeline which is a huge progress. Thanks a lot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're very welcome @elena_skorodilo ! Happy to have been of some assistance :)
Feel free to reach out to the community if you ever need help!
Thank you,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.