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

Git SCM fails to build with parameterized builds with empty string

    XMLWordPrintable

Details

    Description

      Create a freestyle build project with the following settings:

      • This build is parameterized
        • Name = BRANCH_SPECIFIER
        • Default Value = <leave blank>
      • Source Code Management
        • Git
          • Branch Specifier (blank for default): = $BRANCH_SPECIFIER

      Then trigger a build with BRANCH_SPECIFIER set to default, the empty string. The build will fail with output similar to this:

      GitAPI created
      Pruning obsolete local branches
      [workspace] $ git remote prune ssh://git@git.socrata.com/core
      Fetching changes from the remote Git repository
      Fetching upstream changes from ssh://git@git.socrata.com/core
      [workspace] $ git fetch -t ssh://git@git.socrata.com/core +refs/heads/*:refs/remotes/origin/*
      [workspace] $ git submodule init
      [workspace] $ git submodule sync
      [workspace] $ git config --get remote.origin.url
      [workspace] $ git ls-tree HEAD
      [workspace] $ git tag -l 
      [workspace] $ git rev-parse origin/
      ERROR: Nothing to do
      

      An easy workaround is to set the parameter default to "" or "*".

      Attachments

        Issue Links

          Activity

            natacado natacado created issue -
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            markewaite Mark Waite made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 138800 ] JNJira + In-Review [ 204875 ]
            sh0ked Nikolay Ustinov made changes -
            Link This issue blocks JENKINS-40376 [ JENKINS-40376 ]

            People

              abayer Andrew Bayer
              natacado natacado
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: