jenkinsci / jenkinsci/git-plugin

[JENKINS-65448] [Git][Parameterized Trigger] 'Pass-through Git commit' does not include repo URI and breaks pipeline build

Open
#3,653 3 comments 0 reactions 0 assignees View on GitHub
component:git-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Consider the following situation:



  • job1 (classical freestyle)

    • build


    • post

      • Trigger parameterized build on other projects

        • job2 

        • [x] Pass-through Git Commit that was built







  • job2 (pipeline):


This constellation will fail to build, because the commit-ID passed-through from build of job1 is being used to fetch the pipeline of job2 and also (if it would get so far) would be used for the step2 of the pipeline, but it should only apply to step1.

The technical issue is that in

hudson.plugins.git.GitRevisionBuildParameters

no repoURL is passed to the constructor of

hudson.plugins.git.RevisionParameterAction.

That one then, in canOriginateFrom() always returns true and uses the revision ID for all git repos involved in the pipeline.

---
Originally reported by sratz, imported from: [Git][Parameterized Trigger] 'Pass-through Git commit' does not include repo URI and breaks pipeline build


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-02

Raw content of original issue

Consider the following situation:



  • job1 (classical freestyle)

    • build


    • post

      • Trigger parameterized build on other projects

        • job2 

        • [x] Pass-through Git Commit that was built







  • job2 (pipeline):


This constellation will fail to build, because the commit-ID passed-through from build of job1 is being used to fetch the pipeline of job2 and also (if it would get so far) would be used for the step2 of the pipeline, but it should only apply to step1.

The technical issue is that in

hudson.plugins.git.GitRevisionBuildParameters

no repoURL is passed to the constructor of

hudson.plugins.git.RevisionParameterAction.

That one then, in canOriginateFrom() always returns true and uses the revision ID for all git repos involved in the pipeline.

environment

```
Jenkins 2.277.3

git-plugin 4.7.1

parameterized-trigger 2.40
```

1 attachment

- [image-2021-04-23-14-35-32-951.png](https://issues.jenkins.io/secure/attachment/54658/image-2021-04-23-14-35-32-951.png)
> ![image-2021-04-23-14-35-32-951.png](https://issues.jenkins.io/secure/attachment/54658/image-2021-04-23-14-35-32-951.png)

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.