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

default parameter values are ignored when triggering parameterized build from groovy post-build script

      Steps to reproduce:

      1. create job Foo with two string parameters: MAJOR, with default value '1', MINOR, with default value '0'
      2. create job Bar with a groovy post-build hook thus:

        def params = []
        params.push( new StringParameterValue( 'MINOR', 2 ) )
        def foo = manager.hudson.getJob( 'Foo' )
        foo.scheduleBuild( 2, new Cause.UpstreamCause( manager.build ), new ParametersAction( params ) )
      

      3. build Bar

      Expected Result:

      Foo builds with parameter values MAJOR=1, MINOR=2

      Actual Result:

      Foo build with parameter values MINOR=2

      If MAJOR isn't specified in the parameter list when invoking the build, it should use the default value in Foo's configuration. Instead, the parameter isn't evaluated at all.

          [JENKINS-13768] default parameter values are ignored when triggering parameterized build from groovy post-build script

          evilchili created issue -
          ikedam made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: parameterized-trigger [ 15592 ]
          Assignee Original: huybrechts [ huybrechts ]
          Issue Type Original: Bug [ 1 ] New: Improvement [ 4 ]
          Jesse Glick made changes -
          Link New: This issue is related to SECURITY-170 [ SECURITY-170 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30178 [ JENKINS-30178 ]
          Daniel Beck made changes -
          Link New: This issue is related to JENKINS-31897 [ JENKINS-31897 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 144235 ] New: JNJira + In-Review [ 176107 ]
          Rik de Groot made changes -
          Priority Original: Major [ 3 ] New: Blocker [ 1 ]
          Jesse Glick made changes -
          Component/s New: groovy-postbuild-plugin [ 15685 ]
          Component/s Original: core [ 15593 ]
          Assignee New: Stefan Wolf [ wolfs ]
          Axel Heider made changes -
          Link New: This issue relates to JENKINS-42698 [ JENKINS-42698 ]

            wolfs Stefan Wolf
            evilchili evilchili
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: