For both pipeline and freestyle job. To have a way to configure a Git parameter with an URL, and without a Scm configuration. Then as usual, we can select on of the list of branches/tags. All of that without checkout by Git Parameter.
Essentially, I would like to have a light behavior that only does git ls-remote, but no checkout, and with a Url configuration in the Git Parameter, but not on the Scm configuration.
- Because in our project, we have multiple repositories to select version. Except for Jenkinsfile checkout, we don't want to checkout other repositories because we do that in the pipeline. This way, we prevent space and time lost.
- Also, in the case where we have a scripted pipeline in the Job (so no Jenkinsfile in Git repo), but we also want to list Git branches/tags of some repo. This is not possible because we can't both have a SCM configuration for pipeline AND a scripted job pipeline.
Remove Git Parameter from the job, add in the pipeline a input step with a list of choice, populated with manual "git ls-remove" command.
Doc to adapt (source here):