0

I am trying to implement devops(CI/CD pipelines) on few of the python projects. All of the python projects are available in git repository. I have implemented devops on each python projects, shown below the build pipeline for one of the project and it was working successfully. enter image description here enter image description here enter image description here enter image description here

Now i have brought all of the python projects in a single repository as multi module project as shown below. enter image description here Now I want to implement devops by crating CI/CD pipelines on each of the modules separately. For that, I have created build(CI) pipelines which are similar as above, by modifying requirement.txt and set up.py files path as modulename/requirement.txt and modulename/setup.py.

setup.py file is failing by throwing an error, unable to find the package and the task for test is failing because of not able to find the packages which are having test resource files. enter image description here

Below is the folder structure of python module.

enter image description here

Any idea how to resolve these errors?

Is there any reference for implementing devops(CI/CD) on python multi module projects?

Any leads much appreciated!

Antony
  • 970
  • 3
  • 20
  • 46
  • *"I am trying to implement devops on few of the python projects."* You mean you want to set up a CI/CD pipeline!? – Klaus D. Feb 23 '21 at 05:07
  • Yes...trying to implement CI/CD pipelines. – Antony Feb 23 '21 at 05:24
  • In your case the tests failed. There seems to be a file missing on the runner. – Klaus D. Feb 23 '21 at 05:26
  • The pipeline will checkout entire repository, from there how to execute these build steps only on a single module/create packages from a single module? – Antony Feb 23 '21 at 05:30
  • Give the module as an argument to your `pytest` command: See https://stackoverflow.com/a/62804929/3929826 for details! – Klaus D. Feb 23 '21 at 05:34
  • I tried running test case on the module by providing below comments. `pip install pytest && pytest --doctest-modules --junitxml=junit/test-results.xml` but as I shown in the folder structure diagram in the question, the test cases are not able to fetch file from folder named **package_resources** – Antony Feb 23 '21 at 09:35

0 Answers0