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

Build job succeds even though pretested says error (case 13574)

    XMLWordPrintable

Details

    Description

      The preintegration post build step fails with an exception and marks build as failure.
      Still the build ends up as success.

      [PREINT] Performing pre-verified post build steps
      [PREINT] Using the master branch for polling and development is not allowed since it will attempt to merge it to other branches and delete it after. Failing build.
      ERROR: Build step failed with exception
      java.lang.IllegalStateException: cannot change build result while in POST_PRODUCTION
      	at hudson.model.Run.setResult(Run.java:459)
      	at org.jenkinsci.plugins.pretestedintegration.scm.git.GitBridge.handlePostBuild(GitBridge.java:565)
      	at org.jenkinsci.plugins.pretestedintegration.PretestedIntegrationAction.finalise(PretestedIntegrationAction.java:94)
      	at org.jenkinsci.plugins.pretestedintegration.PretestedIntegrationPostCheckout.perform(PretestedIntegrationPostCheckout.java:58)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:776)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      	at hudson.model.Build$BuildExecution.cleanUp(Build.java:193)
      	at hudson.model.Run.execute(Run.java:1785)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:381)
      Build step 'Pretested Integration post-build' marked build as failure
      [WS-CLEANUP] Deleting project workspace...[WS-CLEANUP] done
      Warning: ‘Access Control for Builds’ in global security configuration is empty, so falling back to legacy behavior of permitting any downstream builds to be triggered
      Triggering a new build of pack-status__publish__master
      Finished: SUCCESS
      

      Attachments

        Activity

          madsnielsen Mads Nielsen added a comment -

          Thanks for reporting this Per.

          It's been added to our worklog for September.

          madsnielsen Mads Nielsen added a comment - Thanks for reporting this Per. It's been added to our worklog for September.

          Code changed in jenkins
          User: Mads Nielsen
          Path:
          src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationBuildWrapper.java
          src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationPostCheckout.java
          src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GitBridge.java
          src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GitIntegrationStrategy.java
          src/test/java/org/jenkinsci/plugins/pretestedintegration/unit/PretestedIntegrationBuildWrapperTest.java
          http://jenkins-ci.org/commit/pretested-integration-plugin/019c19b0b651db847a47de431feef6fc91933d55
          Log:
          JENKINS-30465 Post Build step unable to change status of build

          We've changed our post build step to a Recorder, one which is able to change the result.

          This also means we had to remove the automatically added git publisher. This now needs to
          be added manually.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mads Nielsen Path: src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationBuildWrapper.java src/main/java/org/jenkinsci/plugins/pretestedintegration/PretestedIntegrationPostCheckout.java src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GitBridge.java src/main/java/org/jenkinsci/plugins/pretestedintegration/scm/git/GitIntegrationStrategy.java src/test/java/org/jenkinsci/plugins/pretestedintegration/unit/PretestedIntegrationBuildWrapperTest.java http://jenkins-ci.org/commit/pretested-integration-plugin/019c19b0b651db847a47de431feef6fc91933d55 Log: JENKINS-30465 Post Build step unable to change status of build We've changed our post build step to a Recorder, one which is able to change the result. This also means we had to remove the automatically added git publisher. This now needs to be added manually.

          Fixed in 2.4.0

          thi Thierry Lacour added a comment - Fixed in 2.4.0

          People

            praqma Praqma Support
            pablaasmo Per Arnold Blaasmo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: