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

PostBuildScript 1.1.0 Configuration Not Persistent

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • postbuildscript-plugin
    • None
    • Ubuntu 16.04
      Jenkins 2.73.3

      The settings for a job using postbuildscript plugin 1.1.0 are not persistent.

      1. Run the attached DSL job, this will create a job called 'foobar'
      2. Examine the resulting config.xml (do not edit using Jenkins, yet).
      3. The postbuildscript shell task in config.xml should look like so:

      <publishers>
      <org.jenkinsci.plugins.postbuildscript.PostBuildScript plugin="postbuildscript@1.1.0">
      <config>
      <genericScriptFiles/>
      <groovyScriptFiles/>
      <groovyScripts/>
      <buildSteps>
      <org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
      <results>
      <string>SUCCSESS</string>
      <string>FAILURE</string>
      <string>UNSTABLE</string>
      </results>
      <role>SLAVE</role>
      <buildSteps>
      <hudson.tasks.Shell>
      <command>echo hello</command>
      </hudson.tasks.Shell>
      </buildSteps>
      </org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
      </buildSteps>
      <markBuildUnstable>false</markBuildUnstable>
      </config>
      </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
      </publishers>

      4. Configure the resulting job (foobar) using Jenkins, but don't save it
      5. Re-examine config.xml for job "foobar", it should look like so:

      <publishers>
      <org.jenkinsci.plugins.postbuildscript.PostBuildScript plugin="postbuildscript@1.1.0">
      <config>
      <genericScriptFiles/>
      <groovyScriptFiles/>
      <groovyScripts/>
      <buildSteps>
      <org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
      <results/>
      <role>BOTH</role>
      <buildSteps/>
      </org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
      </buildSteps>
      <markBuildUnstable>false</markBuildUnstable>
      </config>
      </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
      </publishers>

      The configuration has changed..

          [JENKINS-48180] PostBuildScript 1.1.0 Configuration Not Persistent

          Daniel Heid added a comment -

          Thanks for reporting this issue! I'll fix this as soon as possible.

          Daniel Heid added a comment - Thanks for reporting this issue! I'll fix this as soon as possible.

          Daniel Heid added a comment -

          Ehm... The Job DSL hasn't been updated yet. It is not compatible with version 1.1.0. I'll update it soon.

          You have also have a typo in your script: 

          results(["SUCCSESS", "FAILURE", "UNSTABLE"])
          

          should be

          results(["SUCCESS", "FAILURE", "UNSTABLE"])
          

          I'll try to fix your Job DSL script and retest it. Thanks for attaching it!

          Daniel Heid added a comment - Ehm... The Job DSL hasn't been updated yet. It is not compatible with version 1.1.0. I'll update it soon. You have also have a typo in your script:  results([ "SUCCSESS" , "FAILURE" , "UNSTABLE" ]) should be results([ "SUCCESS" , "FAILURE" , "UNSTABLE" ]) I'll try to fix your Job DSL script and retest it. Thanks for attaching it!

          Daniel Heid added a comment -

          Okay, this is caused by the same bug already referenced in JENKINS-48197. I fixed it and will soon release a new version.

          Thank you for fixing the plugin as well!

          Daniel Heid added a comment - Okay, this is caused by the same bug already referenced in JENKINS-48197 . I fixed it and will soon release a new version. Thank you for fixing the plugin as well!

            dheid Daniel Heid
            fzbassman Eric Wallengren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: