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

Upgrade from 0.17 incomplete when scriptOnlyIfSuccess and scriptOnlyIfFailure are both false

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: postbuildscript-plugin
    • Labels:
      None
    • Environment:
      Windows 2012R2 x64
      Jenkins 2.104 (was: 1.6x)
      PostBuildScript Plugin 2.30 (was: 0.17)
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: