[JIRA] [git-plugin] (JENKINS-27962) Build Parameter Variable In Branch Name Causes ALL GIT branches to kick off job

2 views
Skip to first unread message

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 26, 2015, 1:13:01 AM7/26/15
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Fixed
 
Jenkins / Bug JENKINS-27962
Build Parameter Variable In Branch Name Causes ALL GIT branches to kick off job
Change By: Mark Waite
Status: Resolved Closed
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 26, 2015, 1:13:02 AM7/26/15
to jenkinsc...@googlegroups.com
Mark Waite resolved as Fixed
 

I tested this with git plugin 2.4.0 and git client plugin 1.18.0 and it is fixed as far as I can tell.

Steps I used to verify it:

  1. Create a new job JENKINS-27962 -parameterized-branch-job-always-runs-after-poll
  2. Define a string parameter "BRANCH_TO_BUILD" with default value "master"
  3. Use a convenient repository with more than one branch
  4. Define "Branches to build" as "origin/$BRANCH_TO_BUILD"
  5. Enable "Poll SCM" with no schedule
  6. Start that build by running the post-receive hook for the convenient repository with more than one branch
  7. Commit to a different branch in the convenient repository, confirm that polling runs and that the build does not run
Change By: Mark Waite
Status: Open Resolved
Resolution: Fixed

pranasblk@gmail.com (JIRA)

unread,
Dec 22, 2015, 8:26:01 PM12/22/15
to jenkinsc...@googlegroups.com
Pranas Baliuka reopened an issue
 

Steps I used to verify it:

  • Create a new job "<Project name> branches"
  • Define a string parameter "branches" (or "branch") with default value N/A
  • Use a convenient repository with more than one branch
  • Define "Branches to build" as "**"
  • Enable "Poll SCM" with no schedule
  • Start that build by running the post-receive hook for the convenient repository with more than one branch
  • Commit to a different branch in the convenient repository, confirm that polling runs and that the build does not run

    Actual result:
    The parameter's branches value is empty ""

    Expected result:
    "test_branch"

    The parameter "branches" is null. Used to set build tag with Gradle post-build plugin on build with the

    manager.addShortText("${manager.build.buildVariables.get('branches')}")

    Note:
    I've tried to pass parameters branch, branches but parameter values is not populated to the Parameters plug-in via HTTP POST triggered action.

    https://<Jenkins server>/jenkins/git/notifyCommit?url=ssh://git@<Git sever>/<Project name>&branches=test_branch&branch=test_branch
    

    Versions:
    GIT plugin - 2.4.0
    Git Parameter Plug-In - 0.4.0
    GIT client plugin - 1.18.0
    Git Tag Message Plugin - 1.4
    Groovy Postbuild - 2.2.2

    Change By: Pranas Baliuka
    Resolution: Fixed
    Status: Closed Reopened

    mark.earl.waite@gmail.com (JIRA)

    unread,
    Dec 22, 2015, 8:56:01 PM12/22/15
    to jenkinsc...@googlegroups.com
    Mark Waite commented on Bug JENKINS-27962
     
    Re: Build Parameter Variable In Branch Name Causes ALL GIT branches to kick off job

    Pranas Baliuka you state that the expected value of the parameter's branch value is "test_branch" but don't mention if the expected branch was built, or if as the bug report says "all branches" were built.

    If it did not cause all branches to be built, then I believe it was a mistake to reopen this bug. If the issue is that a parameter value passed with notifyCommit is not available inside the job, then you've reopened this bug instead of referring to the discussion (and current fix) of JENKINS-30178.

    If the problem you're seeing is that the correct branch is being built, but no value is assigned to the branch name, then I believe that is a very different bug from the bug which is described here.

    mark.earl.waite@gmail.com (JIRA)

    unread,
    Dec 22, 2015, 8:57:02 PM12/22/15
    to jenkinsc...@googlegroups.com
    Mark Waite edited a comment on Bug JENKINS-27962
    [~pranasblk] you state that the expected value of the parameter's branch value is "test_branch" but don't mention if the expected branch was built, or if as the bug report says "all branches" were built.

    If it did not cause all branches to be built, then I believe it was a mistake to reopen this bug.  If the issue is that a parameter value passed with notifyCommit is not available inside the job, then you've reopened this bug instead of referring to the discussion (and current fix) of JENKINS-30178.
      If that is the case, please close this bug again and experiment with the latest build of the git plugin and git client plugin to confirm that the fix for JENKINS-30178 also meets your needs.

    If the problem you're seeing is that the correct branch is being built, but no value is assigned to the branch name, then I believe that is a very different bug from the bug which is described here.

    pranasblk@gmail.com (JIRA)

    unread,
    Dec 22, 2015, 11:10:02 PM12/22/15
    to jenkinsc...@googlegroups.com
    Pranas Baliuka resolved as Incomplete
     

    The situation is not identical. The ticket should remain closed.

    Change By: Pranas Baliuka
    Status: Reopened Resolved
    Resolution: Incomplete

    mark.earl.waite@gmail.com (JIRA)

    unread,
    Oct 22, 2019, 9:33:13 PM10/22/19
    to jenkinsc...@googlegroups.com
    Mark Waite closed an issue as Incomplete
    Change By: Mark Waite
    Status: Resolved Closed
    This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
    Atlassian logo
    Reply all
    Reply to author
    Forward
    0 new messages