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

When Jenkins restarts, the groovy scripts are lost

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • active-choices-plugin
    • None
    • Jenkins 2.19.2 fresh install as a service on Windows 10

      Hello,

      Here are the steps that make the active parameters groovy script disappear :

      • Configure a new Jenkins 2 pipeline project
      • Declare active parameters with groovy scripts
      • Save
      • (build)
      • Restart Jenkins with the url : http://myjenkins:8080/restart
      • The active parameters are still here, but the textareas containing the groovy scripts are blank

      Thanks for your support
      If it can help, I have this in jenkins.err.log when I save the job configuration :

      nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
      AVERTISSEMENT: Script parameter with name 'Etape' is not an instance of java.util.Map. The parameter value is null
      nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
      AVERTISSEMENT: Script parameter with name 'SVN' is not an instance of java.util.Map. The parameter value is null
      nov. 06, 2016 9:19:43 AM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
      

      The active parameter declaration is the following :

      Simple select

      if (Type.equals("Build complet")) {
          return [];
      } else {
          return ["Etape 1", "Etape 2"]
      }
      

          [JENKINS-39534] When Jenkins restarts, the groovy scripts are lost

          Kiruahxh created issue -
          Kiruahxh made changes -
          Description Original: Hello,

          Here are the steps that make the active parameters groovy script disappear :
          - Configure a new Jenkins 2 pipeline project
          - Declare active parameters with groovy scripts
          - Save
          - (build)
          - Restart Jenkins with the url : http://myjenkins:8080/restart
          - The active parameters are still here, but the textareas containing the groovy scripts are blank

          Thanks for your support
          New: Hello,

          Here are the steps that make the active parameters groovy script disappear :
          - Configure a new Jenkins 2 pipeline project
          - Declare active parameters with groovy scripts
          - Save
          - (build)
          - Restart Jenkins with the url : http://myjenkins:8080/restart
          - The active parameters are still here, but the textareas containing the groovy scripts are blank

          Thanks for your support
          If it can help, I have this in jenkins.err.log when I save the job configuration :
          nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
          AVERTISSEMENT: Script parameter with name 'Etape' is not an instance of java.util.Map. The parameter value is null
          nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
          AVERTISSEMENT: Script parameter with name 'SVN' is not an instance of java.util.Map. The parameter value is null
          nov. 06, 2016 9:19:43 AM org.jenkinsci.plugins.workflow.job.WorkflowRun finish

          The active parameter declaration is the following :
          Simple select
          if (Type.equals("Build complet")) {
              return [];
          } else {
              return ["Etape 1", "Etape 2"]
          }
          Bruno P. Kinoshita made changes -
          Link New: This issue depends on JENKINS-29407 [ JENKINS-29407 ]
          Bruno P. Kinoshita made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Kiruahxh made changes -
          Resolution Original: Duplicate [ 3 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Bruno P. Kinoshita made changes -
          Description Original: Hello,

          Here are the steps that make the active parameters groovy script disappear :
          - Configure a new Jenkins 2 pipeline project
          - Declare active parameters with groovy scripts
          - Save
          - (build)
          - Restart Jenkins with the url : http://myjenkins:8080/restart
          - The active parameters are still here, but the textareas containing the groovy scripts are blank

          Thanks for your support
          If it can help, I have this in jenkins.err.log when I save the job configuration :
          nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
          AVERTISSEMENT: Script parameter with name 'Etape' is not an instance of java.util.Map. The parameter value is null
          nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
          AVERTISSEMENT: Script parameter with name 'SVN' is not an instance of java.util.Map. The parameter value is null
          nov. 06, 2016 9:19:43 AM org.jenkinsci.plugins.workflow.job.WorkflowRun finish

          The active parameter declaration is the following :
          Simple select
          if (Type.equals("Build complet")) {
              return [];
          } else {
              return ["Etape 1", "Etape 2"]
          }
          New: Hello,

          Here are the steps that make the active parameters groovy script disappear :
          - Configure a new Jenkins 2 pipeline project
          - Declare active parameters with groovy scripts
          - Save
          - (build)
          - Restart Jenkins with the url : http://myjenkins:8080/restart
          - The active parameters are still here, but the textareas containing the groovy scripts are blank

          Thanks for your support
          If it can help, I have this in jenkins.err.log when I save the job configuration :

          {noformat}
          nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
          AVERTISSEMENT: Script parameter with name 'Etape' is not an instance of java.util.Map. The parameter value is null
          nov. 06, 2016 9:19:34 AM org.biouno.unochoice.AbstractScriptableParameter getChoices
          AVERTISSEMENT: Script parameter with name 'SVN' is not an instance of java.util.Map. The parameter value is null
          nov. 06, 2016 9:19:43 AM org.jenkinsci.plugins.workflow.job.WorkflowRun finish
          {noformat}

          The active parameter declaration is the following :

          Simple select

          {code}
          if (Type.equals("Build complet")) {
              return [];
          } else {
              return ["Etape 1", "Etape 2"]
          }
          {code}
          Bruno P. Kinoshita made changes -
          Link New: This issue is related to JENKINS-39620 [ JENKINS-39620 ]
          Bruno P. Kinoshita made changes -
          Status Original: Reopened [ 4 ] New: Open [ 1 ]
          Bruno P. Kinoshita made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Bruno P. Kinoshita made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            kinow Bruno P. Kinoshita
            kiruahxh Kiruahxh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: