Jenkins pipeline - Manipulating another git repository

60 Views Asked by At

Main question

Is it possible from a given jenkins pipeline job using git to manipulate another git repo?

Background for the question

We have a git repo running as a pipeline on Jenkins. When its build is successful it triggers another Jenkins job that will conduct a series of tests on some of the artifacts produced by the first job. When that test job is done, we would like it to manipulate the first repo (e.g. tagging or pushing to a release branch). It has to be noted that the test build takes significantly more time the project build. So the clear advantage of that design is that it makes good use of Jenkins queuing system, so that every build from the first job will be tested (and tagged appropriately). But maybe there is a better way to achieve this?

Details

Pushing or tagging to the current repo is straightforward using "sshagent" in a pipeline stage. But is there a way to achieve the same commands to a different repo?

0

There are 0 best solutions below