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

Upgrade from 0.17 incomplete when scriptOnlyIfSuccess and scriptOnlyIfFailure are both false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • postbuildscript-plugin
    • None
    • Windows 2012R2 x64
      Jenkins 2.104 (was: 1.6x)
      PostBuildScript Plugin 2.30 (was: 0.17)

      The effects of this issue have been mentioned, but not addressed, in JENKINS-48169

      Multiple jobs contained the post build step part:

      <org.jenkinsci.plugins.postbuildscript.PostBuildScript plugin="postbuildscript@0.17">
        <buildSteps>
          <hudson.tasks.BatchFile>
            <command>somecommand</command>
          </hudson.tasks.BatchFile>
        </buildSteps>
        <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
        <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
        <markBuildUnstable>true</markBuildUnstable>
      </org.jenkinsci.plugins.postbuildscript.PostBuildScript>

      After upgrading, this became:

      <org.jenkinsci.plugins.postbuildscript.PostBuildScript plugin="postbuildscript@2.3.0">
        <config>
          <scriptFiles/>
          <groovyScripts/>
          <buildSteps>
            <org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
              <results/>
              <role>BOTH</role>
              <buildSteps>
                <hudson.tasks.BatchFile>
                  <command>somecommand</command>
                </hudson.tasks.BatchFile>
              </buildSteps>
            </org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
          </buildSteps>
          <markBuildUnstable>true</markBuildUnstable>
        </config>
      </org.jenkinsci.plugins.postbuildscript.PostBuildScript>
      

      Due to no results being selected this results in

      [PostBuildScript] - Build does not have any of the results []. Did not execute build step #0.
      

      I am only guessing as to what the intention was of:

        <scriptOnlyIfSuccess>false</scriptOnlyIfSuccess>
        <scriptOnlyIfFailure>false</scriptOnlyIfFailure>
      

      Since the job was created by an ex-coworker, so have selected success / unstable / failure from the selection list.

      Please smoothen out the upgrade to handle this case - figuring out what is going wrong with someone else's job after an upgrade is not a nice experience.

            dheid Daniel Heid
            smd Stefan Drissen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: