You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
- pip install requirements.txt
- python $BITBUCKET_CLONE_DIR/Folder3/Sub Folder 1/run-test.py
It is building Python docker and installing all the requirements.
Issue is when it's trying to access a module in my repo while running tests.
Repo structure is like,
-Sub Folder 1
So whenever run-test.py file tries to access or import Folder1 or Folder 2, I am getting Module not found error.
I am using $BITBUCKET_CLONE_DIR variable also before run-test.py file, so that it will identify the path.
I could see that it's cloning the repo to BITBUCKET_CLONE_DIR path
Is there any way to set the path in pipelines.yml file so that it would find path for all files and work.
G'day and welcome to the community @Saranya Devi
Have you looked into using the sys path in your script to set the path file manually?
Because by default, the Python interpreter will check for the file in the current directory only, and we need to set the file path manually to import the modules from another directory.
There is various way of doing these; please check the following suggested workaround: