Virtual environment does not open when executing shell script in Jenkins docker container

208 views Asked by At

To run my python tests I created a freestyle project in Jenkins and wrote a script like this:

. .env/bin/activate
   pip install pytest
pytest --alluredir='FINAL/ws/allure-results' ./FINAL/autotests

But the build crashes with the "Can't open" error: "Can't open" error:

1

There are 1 answers

0
Sourav On BEST ANSWER

You can try by adding #!/bin/bash in the first line of the script step and then try to execute.