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

Managed Scripts plugin 1.5.2 doesn't save Defined arguments

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • managed-scripts-plugin
    • None
    • Jenkins 2.274
      Managed Scripts Plugin 1.5.2

      Managed Scripts plugin 1.5.2 doesn't save jobs Defined arguments, and fails on jobs execution because required arguments are not set.

          [JENKINS-64554] Managed Scripts plugin 1.5.2 doesn't save Defined arguments

          Francis Labrie added a comment - - edited

          Log example:

          executing script 'App Store Download Statistics'
          [iOS Application Statistics] $ /bin/sh /var/folders/fm/zhsywfqj34nb8r1jbjh4q6s00000gp/T/build_step_template6679885015774512085.sh
          Starting script with the following arguments:
            Product Identifier = 
            Start Date = 
            Backup Directory = 
          /var/folders/fm/zhsywfqj34nb8r1jbjh4q6s00000gp/T/build_step_template6679885015774512085.sh|139| error| Missing Product Identifier argument.
          

          I need to revert to Jenkins 2.273 and Managed Scripts 1.4 plugin to get it working again.

          Francis Labrie added a comment - - edited Log example: executing script 'App Store Download Statistics' [iOS Application Statistics] $ /bin/sh / var /folders/fm/zhsywfqj34nb8r1jbjh4q6s00000gp/T/build_step_template6679885015774512085.sh Starting script with the following arguments: Product Identifier = Start Date = Backup Directory = / var /folders/fm/zhsywfqj34nb8r1jbjh4q6s00000gp/T/build_step_template6679885015774512085.sh|139| error| Missing Product Identifier argument. I need to revert to Jenkins 2.273 and Managed Scripts 1.4 plugin to get it working again.

          I've updated the Token Macro Plugin to version 2.14, and I still have the issue: Defined arguments are not saved anymore.

          Francis Labrie added a comment - I've updated the Token Macro Plugin to version 2.14, and I still have the issue: Defined arguments are not saved anymore.

          I can confirm this as well. Jenkins 2.274, Managed Scripts 1.5.2.

          Edit script parameters:

          Save job. Return to job configuration. All parameters are lost.

          On a side note, ruling out any client side scripts malfunction... it's possible to see form parameters being sent during the post request.

          Julio Morimoto added a comment - I can confirm this as well. Jenkins 2.274, Managed Scripts 1.5.2. Edit script parameters: Save job. Return to job configuration. All parameters are lost. On a side note, ruling out any client side scripts malfunction... it's possible to see form parameters being sent during the post request.

          Even if Tokenized is unchecked, parameters are still lost. So Token Macro Plugin likely has nothing to do with this.

          Julio Morimoto added a comment - Even if Tokenized is unchecked, parameters are still lost. So Token Macro Plugin likely has nothing to do with this.

          Super added a comment -

          I have the same issue:

          Super added a comment - I have the same issue:

          Super added a comment - - edited

          maybe this can help with the debug, the client is sending the data to the server. looking to the json:

          , "buildStep": {"buildStepId": "c09d7314-edac-4540-8755-733862f82ae0", "defineArgs": true, "tokenized": false, "buildStepArgs": [{"arg": "$VERSION"}, {"arg": "$DOCKER_IMAGE_ORIG"}, {"arg": "$DOCKER_IMAGE_DEST"}, {"arg": "$REGISTRY_DEV"}, {"arg": "$REGISTRY_PROD"}, {"arg": "$OPENSHIFT_URL"}, {"arg": "$OPENSHIFT_USER"}, {"arg": "$OPENSHIFT_PASS1"}], "stapler-class": "org.jenkinsci.plugins.managedscripts.ScriptBuildStep", "$class": "org.jenkinsci.plugins.managedscripts.ScriptBuildStep"},
          

           

           

          Super added a comment - - edited maybe this can help with the debug, the client is sending the data to the server. looking to the json: , "buildStep" : { "buildStepId" : "c09d7314-edac-4540-8755-733862f82ae0" , "defineArgs" : true , "tokenized" : false , "buildStepArgs" : [{ "arg" : "$VERSION" }, { "arg" : "$DOCKER_IMAGE_ORIG" }, { "arg" : "$DOCKER_IMAGE_DEST" }, { "arg" : "$REGISTRY_DEV" }, { "arg" : "$REGISTRY_PROD" }, { "arg" : "$OPENSHIFT_URL" }, { "arg" : "$OPENSHIFT_USER" }, { "arg" : "$OPENSHIFT_PASS1" }], "stapler-class" : "org.jenkinsci.plugins.managedscripts.ScriptBuildStep" , "$class" : "org.jenkinsci.plugins.managedscripts.ScriptBuildStep" },    

          I created a pull request that may fix this for 2.264 and newer versions of Jenkins; I haven't tested it with an older version of Jenkins: https://github.com/jenkinsci/managed-scripts-plugin/pull/13

          Bryson Gibbons added a comment - I created a pull request that may fix this for 2.264 and newer versions of Jenkins; I haven't tested it with an older version of Jenkins: https://github.com/jenkinsci/managed-scripts-plugin/pull/13

          Gbi added a comment -

          the fix from farmgeek4lifelooks good for me.

          flabrie can you try again with managed-scripts 1.5.3?

          Gbi added a comment - the fix from farmgeek4life looks good for me. flabrie can you try again with managed-scripts 1.5.3?

          I updated to 1.5.3 and still have this issue. Iam using Jenkins version 2.257 and can currently not upgrade because of https://issues.jenkins.io/browse/JENKINS-64072

          Edwin van der Ham added a comment - I updated to 1.5.3 and still have this issue. Iam using Jenkins version 2.257 and can currently not upgrade because of  https://issues.jenkins.io/browse/JENKINS-64072

          Simon Tunnat added a comment -

          I'm on the latest Jenkins LTS version and also have this issue.
          I could only fix it by installing version 1.4 of the Managed Scripts plugin.

          This is my system:

          • Managed Scripts plugin version 1.5.1 / 1.5.2 / 1.5.3
          • Jenkins version 2.263.2
          • Windows Server 2012 R2

          Simon Tunnat added a comment - I'm on the latest Jenkins LTS version and also have this issue. I could only fix it by installing version 1.4 of the Managed Scripts plugin. This is my system: Managed Scripts plugin version 1.5.1 / 1.5.2 / 1.5.3 Jenkins version 2.263.2 Windows Server 2012 R2

          We upgraded Jenkins to 2.277 today and it seems that this fixes the issue in combination with 1.5.3 of the managed scripts plugin.

          Edwin van der Ham added a comment - We upgraded Jenkins to 2.277 today and it seems that this fixes the issue in combination with 1.5.3 of the managed scripts plugin.

          Simon Tunnat added a comment -

          Upgrading Jenkins to version 2.277 is no solution for, because we only use the LTS versions.

          If the latest plugin versions only support Jenkins up from e.g. version 2.277, you should add this information to the plugin update center, so no one can install an incompatible plugin version by accident.

          Other plugins that changed GUI stuff are already doing this:

          Simon Tunnat added a comment - Upgrading Jenkins to version 2.277 is no solution for, because we only use the LTS versions. If the latest plugin versions only support Jenkins up from e.g. version 2.277, you should add this information to the plugin update center, so no one can install an incompatible plugin version by accident. Other plugins that changed GUI stuff are already doing this:

          Sandra added a comment - - edited

          Hi,

          same in my case. I have Jenkins LTS 2.263.3 version and this issue appears at least 1.5.X plugin version.

          Also appears two inputs, where the text only appear on the second input (if you go to edit a job with have saved the argument).

          In my case, i've had to downgrade to 1.4 version, where this issue doesn't appear in Jenkins LTS 2.263.3.

          Sandra added a comment - - edited Hi, same in my case. I have Jenkins LTS 2.263.3 version and this issue appears at least 1.5.X plugin version. Also appears two inputs, where the text only appear on the second input (if you go to edit a job with have saved the argument). In my case, i've had to downgrade to 1.4 version, where this issue doesn't appear in Jenkins LTS 2.263.3.

          Gbi added a comment - - edited

          simontunnat thanks for the tip. We've updated the Jenkins version dependency for the v1.5.4.

          Gbi added a comment - - edited simontunnat  thanks for the tip. We've updated the Jenkins version dependency for the v1.5.4.

          Gbi added a comment -

          fixed with v1.5.4

          Gbi added a comment - fixed with v1.5.4

            gbigenios Gbi
            flabrie Francis Labrie
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: