I have a GitHub repository (call it X) for a Python code package, and a separate GitHub repository (call it X-tests) that contains the tests for that package (they're separate repositories because the one containing the tests is private so that it can run other private code). I would like to make it so that when someone pushes to the X repository, Jenkins will run the tests from the X-tests repository, and then do some other stuff related to the X repository (e.g. making a pip wheel).
The only way I can think of to do this is to have three separate Jenkins jobs:
- a job that does nothing, whose GitHub repository is X, where builds are triggered by pushes to X
- a job that runs the tests, whose GitHub repository is X-test, where builds are triggered by completion of job 1
- a job that makes the pip wheel etc., whose GitHub repository is X, where builds are triggered by completion of job 2
Is there any simpler way to do it?