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

PostBuildScript 1.1.0 Configuration Not Persistent

XMLWordPrintable

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

        1. testme.groovy
          0.5 kB
          Eric Wallengren

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

              Created:
              Updated:
              Resolved: