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

Git Parameters not working for Pipeline projects and Jenkinsfile from SCM

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Critical Critical
    • git-parameter-plugin
    • Jenkins version 2.3, all Plugins up to date. Debian 8 64 Bits x86.

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

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

          [JENKINS-34876] Git Parameters not working for Pipeline projects and Jenkinsfile from SCM

          Andreas Oetken created issue -
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 171076 ] New: JNJira + In-Review [ 184154 ]
          Boguslaw Klimas made changes -
          Assignee Original: Andreas Oetken [ enno ] New: Boguslaw Klimas [ klimas7 ]
          Gareth Western made changes -
          Link New: This issue duplicates JENKINS-28447 [ JENKINS-28447 ]
          Jesse Glick made changes -
          Labels New: workflow
          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] ]
          Mark Austin made changes -
          Attachment New: Screenshot_20160817_145201.png [ 33634 ]
          Mark Austin made changes -
          Attachment New: Screenshot_20160817_145625.png [ 33635 ]
          Boguslaw Klimas made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Anudeep Lalam made changes -
          Priority Original: Minor [ 4 ] New: Critical [ 2 ]
          Andrew Bayer made changes -
          Labels Original: workflow New: pipeline workflow

            klimas7 Boguslaw Klimas
            enno Andreas Oetken
            Votes:
            15 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated: