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

Multibranch plugin: Modified properties do not propagate to existing branches

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • branch-api-plugin
    • None
    • Jenkins: 1.612
      Workflow (all): 1.10-beta-1
      Workflow multibranch: 1.9-beta-2

      EDIT: see https://issues.jenkins-ci.org/browse/JENKINS-30206?focusedCommentId=235736&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-235736


      Steps to reproduce:

      1. Create a multi-branch workflow project
      2. Select a git repository as a branch source
      3. Set property strategy to "named branches get different properties"
      4. Add a parameter property (as the default or as an exception that matches the branch you're building. both seem to not work) of a string or boolean with a set default value
      5. Run a branch that attempts to use that property
      6. Property does not appear to be accessible from Jenkinsfile

      Example

      Set parameter property of 'test_parameter' with a default value

      Attempt to use the parameter

      def param = test_parameter
      
      node("nodejs && swarm") {
        checkout scm
        println(param)
      ...
      

      this exception gets thrown when the script is being executed.

      groovy.lang.MissingPropertyException: No such property: test_parameter for class: groovy.lang.Binding
      

      I've tried accessing

      • boolean and string parameters
      • As properties of the 'env' object or directly (The current tutorial for the workflow-plugin suggests that parameters are exported as variables in the global scope)

      And I can't seem to get it to work in any instance

        1. Selection_384.png
          Selection_384.png
          36 kB
        2. config.xml
          3 kB
        3. config.xml
          3 kB
        4. Jenkinsfile
          0.1 kB
        5. build.xml
          6 kB
        6. log
          2 kB

            Unassigned Unassigned
            notnarb Branton Horsley
            Votes:
            6 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: