Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34876

Git Parameters not working for Pipeline projects and Jenkinsfile from SCM

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: git-parameter-plugin
    • Labels:
    • Environment:
      Jenkins version 2.3, all Plugins up to date. Debian 8 64 Bits x86.
    • Similar Issues:

      Description

      I try to setup a pipeline project to build tags using a Jenkinsfile from SCM (Git). Therefore I want to be be able to set the tag I wish to build via the Git Parameter Plugin. If I setup the project like this and hit the "Build with Parameters" button the git parameter plugin tells me "!No Git repository configured in SCM configuration".

        Attachments

        1. params.PNG
          params.PNG
          15 kB
        2. pipeline.PNG
          pipeline.PNG
          32 kB
        3. Screenshot_20160817_145201.png
          Screenshot_20160817_145201.png
          42 kB
        4. Screenshot_20160817_145625.png
          Screenshot_20160817_145625.png
          18 kB
        5. screenshot-1.png
          screenshot-1.png
          40 kB
        6. screenshot-2.png
          screenshot-2.png
          30 kB
        7. screenshot-3.png
          screenshot-3.png
          72 kB
        8. Selection_104.png
          Selection_104.png
          50 kB

          Issue Links

            Activity

            Hide
            gnuhchnim Minh Chung added a comment -

            Boguslaw Klimas Thank you for working on this ticket. I apologize for bringing it back up but I was wondering would it be possible to parametize git branches from the checkouts done in the Jenkinsfile pipeline? I was able to get this this to work in the Pipeline for the primary git source but my Jenkinsfile has additional git sources I also need to check out and would like to parametize those git source branches for selection. 

            Show
            gnuhchnim Minh Chung added a comment - Boguslaw Klimas Thank you for working on this ticket. I apologize for bringing it back up but I was wondering would it be possible to parametize git branches from the checkouts done in the Jenkinsfile pipeline? I was able to get this this to work in the Pipeline for the primary git source but my Jenkinsfile has additional git sources I also need to check out and would like to parametize those git source branches for selection. 
            Hide
            wyvernnot Yan Wang added a comment -

            Oh, I just tried String Parameters and it does not work neither.

            So I guess the problem is not with Git Parameter plugin but SCM plugin.

            Related issue is: https://issues.jenkins-ci.org/browse/JENKINS-34540

            Show
            wyvernnot Yan Wang added a comment - Oh, I just tried String Parameters and it does not work neither. So I guess the problem is not with Git Parameter plugin but SCM plugin. Related issue is: https://issues.jenkins-ci.org/browse/JENKINS-34540
            Hide
            wyvernnot Yan Wang added a comment -

            Hi, I am using Jenkins@2.7.4 with a pipeline project.

            here is the params settings

            here is the pipeline settings

            Show
            wyvernnot Yan Wang added a comment - Hi, I am using Jenkins@2.7.4 with a pipeline project. here is the params settings here is the pipeline settings
            Hide
            klimas7 Boguslaw Klimas added a comment -

            Hi, Yan Wang
            I have configured a simple job:
            Parameter:

            Git Config:

            And job work fine

            Could you get me something more information? About your configuration.

            Regards
            Boguslaw

            Show
            klimas7 Boguslaw Klimas added a comment - Hi, Yan Wang I have configured a simple job: Parameter: Git Config: And job work fine Could you get me something more information? About your configuration. Regards Boguslaw
            Hide
            wyvernnot Yan Wang added a comment -

            I just tried 0.7.0 and I can choose git branches and tags in the drop down.

            But I failed to use it as a variable in * Branch Specifier*, seems the variable is not parsed at all.

            Show
            wyvernnot Yan Wang added a comment - I just tried 0.7.0 and I can choose git branches and tags in the drop down. But I failed to use it as a variable in * Branch Specifier*, seems the variable is not parsed at all.

              People

              • Assignee:
                klimas7 Boguslaw Klimas
                Reporter:
                enno Andreas Oetken
              • Votes:
                14 Vote for this issue
                Watchers:
                25 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: