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

Git Parameters not working for Pipeline projects and Jenkinsfile from SCM

    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

            enno Andreas Oetken created issue -
            rtyler R. Tyler Croy made changes -
            Field Original Value New Value
            Workflow JNJira [ 171076 ] JNJira + In-Review [ 184154 ]
            klimas7 Boguslaw Klimas made changes -
            Assignee Andreas Oetken [ enno ] Boguslaw Klimas [ klimas7 ]
            gareth_western Gareth Western made changes -
            Link This issue duplicates JENKINS-28447 [ JENKINS-28447 ]
            jglick Jesse Glick made changes -
            Labels workflow
            ganthore Mark Austin made changes -
            Comment [ I observed the same problem.

            I came up with a workaround, note that you need git 2.0 in order to do this...

            1) I wrote a script that is executed inside of the git checkout root:

            [code]
            git tag -l --sort=version:refname | sort -r | xargs echo -n | sed 's/ /,/g' | sed '1s/^/key=/' > versions.properties
            [code] ]
            ganthore Mark Austin made changes -
            Attachment Screenshot_20160817_145201.png [ 33634 ]
            ganthore Mark Austin made changes -
            Attachment Screenshot_20160817_145625.png [ 33635 ]
            klimas7 Boguslaw Klimas made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            anudeeplalam Anudeep Lalam made changes -
            Priority Minor [ 4 ] Critical [ 2 ]
            abayer Andrew Bayer made changes -
            Labels workflow pipeline workflow
            abayer Andrew Bayer made changes -
            Labels pipeline workflow pipeline
            klimas7 Boguslaw Klimas made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            klimas7 Boguslaw Klimas made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            wyvernnot Yan Wang made changes -
            Attachment Selection_104.png [ 33910 ]
            klimas7 Boguslaw Klimas made changes -
            Attachment screenshot-1.png [ 33911 ]
            klimas7 Boguslaw Klimas made changes -
            Attachment screenshot-2.png [ 33912 ]
            klimas7 Boguslaw Klimas made changes -
            Attachment screenshot-3.png [ 33913 ]
            wyvernnot Yan Wang made changes -
            Attachment pipeline.PNG [ 33919 ]
            wyvernnot Yan Wang made changes -
            Attachment params.PNG [ 33920 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: