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

When branch build parameter is '*', '**' or empty, a stale revision is built

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • git-plugin
    • None
    • Ubuntu 12.04

    Description

      I have a build parameter, branch, which is passed to the git "Branches to build" setting. When this parameter is set to '*', '**', or is empty, the last built revision gets built again instead of an updated branch HEAD. Setting this parameter to a specific branch name, such as 'development' or 'master' will build the HEAD of the specified branch. Directly setting git "Branches to build" to '*', '**', or leaving it empty will cause an updated branch HEAD to build properly.

      Attachments

        Issue Links

          Activity

            markewaite Mark Waite added a comment -

            I was able to verify the bug as reported. A parameterized build with branch as the parameter does not correctly use the value of that parameter if the value contains a wildcard and ${branch} is inserted into the branch name field.

            The exact same job definition runs successfully if the parameter value provides an exact name for an existing branch.

            The key problem seems to be related to wildcard expansion in the parameter somehow.

            markewaite Mark Waite added a comment - I was able to verify the bug as reported. A parameterized build with branch as the parameter does not correctly use the value of that parameter if the value contains a wildcard and ${branch} is inserted into the branch name field. The exact same job definition runs successfully if the parameter value provides an exact name for an existing branch. The key problem seems to be related to wildcard expansion in the parameter somehow.
            ryanbeesleyagilysys Ryan Beesley added a comment -

            I'm seeing a similar problem, but using a specific branch name, such as master builds another branch. I wonder if this is related.

            ryanbeesleyagilysys Ryan Beesley added a comment - I'm seeing a similar problem, but using a specific branch name, such as master builds another branch. I wonder if this is related.
            markewaite Mark Waite added a comment -

            Ryan, you'll need to provide more information, since I think your case is probably quite different from the problem originally reported in this bug. The case I was able to duplicate only happens if a wildcard is included in the parameterized branch name. That is also what the original submitter reported. Your description seems to indicate that you've found a case where the wrong branch is built, even if the parameter contains no wildcard.

            Can you provide more details (or even better, a separate bug report with detailed steps to show how to duplicate it)?

            markewaite Mark Waite added a comment - Ryan, you'll need to provide more information, since I think your case is probably quite different from the problem originally reported in this bug. The case I was able to duplicate only happens if a wildcard is included in the parameterized branch name. That is also what the original submitter reported. Your description seems to indicate that you've found a case where the wrong branch is built, even if the parameter contains no wildcard. Can you provide more details (or even better, a separate bug report with detailed steps to show how to duplicate it)?
            ryanbeesleyagilysys Ryan Beesley added a comment -

            I was reading through the list of bugs to try and find something that looked like my issue – this was close. Right now all I have are the logs and traces. Some jobs are doing what we expect, but this job in particular is refusing to build master. If that would be enough to submit a report, I can go ahead and do so, but I haven't completely eliminated user error and so I wasn't quite ready to declare that I've found a bug.

            ryanbeesleyagilysys Ryan Beesley added a comment - I was reading through the list of bugs to try and find something that looked like my issue – this was close. Right now all I have are the logs and traces. Some jobs are doing what we expect, but this job in particular is refusing to build master. If that would be enough to submit a report, I can go ahead and do so, but I haven't completely eliminated user error and so I wasn't quite ready to declare that I've found a bug.
            markewaite Mark Waite added a comment -

            If you're willing to continue the investigation to decide conclusively if it is a user error or a software bug, you'll save time that others would spend asking the same question, and you'll very likely increase the chances of the bug being fixed.

            markewaite Mark Waite added a comment - If you're willing to continue the investigation to decide conclusively if it is a user error or a software bug, you'll save time that others would spend asking the same question, and you'll very likely increase the chances of the bug being fixed.

            People

              Unassigned Unassigned
              rheostat Mike Smith
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: