incubator-devlake
incubator-devlake copied to clipboard
Jenkins associate input parameter with git ref
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Use case
The current Jenkins connection assumes that the repo clone by the Jenkins job is the same as the business logic repo that we want Dota metrics from.
In this use case, we want to support separated Jenkins repositories that services leverage to build their app.
Let’s assume we have two git repos: “webapp” and “jenkinsfiles”. If I create a devlake project for the webapp, the GitHub connection in that project points to repo1 (webapp) while the Jenkins connection points to repo2 (jenkinsfiles). When Jenkins runs a new deployment job, it will clone a git SHA from repo2 (jenkinsfiles) not repo1 (webapp). The only link Jenkins knows about back to repo1 is a Jenkins input parameter called “TAG” that gets passed to the job. TAG is a git ref in repo1.
Note: putting the GitHub and Jenkins connections in same project is not enough today. So a deployment is performed with a "devops-setting commit" in repo 2(jenkinsfiles) and a "business-code commit" in both repo 1(webapp), and we should use the latter commit to measure DORA.
If we could specify in the Jenkins association which input parameter defines the git tag/sha, then we would get correct metrics.
Description
If we could specify in the Jenkins association which input parameter defines the git tag/sha, then we would get correct metrics
Related issues
No response
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct