jenkinsci / jenkinsci/git-parameter-plugin

[JENKINS-57225] Remove the GIT SCM configuration prerequisites

Open
#278 4 comments 0 reactions 0 assignees View on GitHub
component:git-parameter-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
131
Forks
134
Avg merge
21h 5m
Merged PRs (30d)
1

Description

Goal:

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.

Why:



  1. 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.

  2. 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.

Workaround:

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):

 

```
Important!
There is no need to set up anything special in plugin settings.
This plugin will read GIT SCM configuration from your projects.
This plugin used directly the Git Plugin and Git Client Plugin.
```

 

 Thank you!

 

---
Originally reported by antoinetran, imported from: Remove the GIT SCM configuration prerequisites


  • status: Open
  • priority: Minor
  • component(s): git-parameter-plugin
  • resolution: Unresolved
  • votes: 4
  • watchers: 6
  • imported: 20251216-182730

Raw content of original issue

Goal:

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.

Why:



  1. 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.

  2. 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.

Workaround:

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):

 



Important! 

There is no need to set up anything special in plugin settings.
This plugin will read GIT SCM configuration from your projects.
This plugin used directly the Git Plugin and Git Client Plugin.


 

 Thank you!

 

environment

```
Jenkins 2.60.3

Git parameter 0.9.6

Git client 2.7.1

Git 3.8.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.