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

PostBuildScript 1.1.0 Configuration Not Persistent

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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..

        Attachments

          Activity

          Hide
          dheid Daniel Heid added a comment -

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

          Show
          dheid Daniel Heid added a comment - Thanks for reporting this issue! I'll fix this as soon as possible.
          Hide
          dheid 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!

          Show
          dheid 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!
          Hide
          dheid 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!

          Show
          dheid 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!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: