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

Build Status marked as Pass when Build Player is Canceled

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • unity3d-plugin
    • jenkins version 2.8
      Unity Plugin Version 1.3
      OS running jenkins = Windows

      Recently I have noticed that the Android build player will cancel, but the build status will not be marked as FAILED or Unstable. I also have conditional steps that run after and actually still kicks off when the APK is not generated.

      I manage a jenkins for multiple teams and BOTH teams have experienced failed builds, with SUCCESS statuses.

      In the log, you clearly can see,

          • Cancelled 'Build.Player.AndroidPlayer' in 2 seconds (2461 ms) ***

      Yet, the build passes.

          [JENKINS-35987] Build Status marked as Pass when Build Player is Canceled

          This again, happened. These 3 print messages are in the log... yet another passing build.

          09:21:43 DisplayProgressNotification: Build Failed
          09:21:43 Error building Player because scripts had compiler error
          09:21:44 *** Cancelled 'Build.Player.AndroidPlayer' in 10 seconds (10379 ms)

          No APK was created, yet build passed.

          John Rodenburg added a comment - This again, happened. These 3 print messages are in the log... yet another passing build. 09:21:43 DisplayProgressNotification: Build Failed 09:21:43 Error building Player because scripts had compiler error 09:21:44 *** Cancelled 'Build.Player.AndroidPlayer' in 10 seconds (10379 ms) No APK was created, yet build passed.

          Karl Tars added a comment -

          This is because you're allowing Unity to exit without throwing an error. If you've written your own Automation script in Unity to build the apk, you should capture and check the returned string from BuildPipeline.BuildPlayer ( https://docs.unity3d.com/ScriptReference/BuildPipeline.BuildPlayer.html ), and throw an exception if appropriate.

          Karl Tars added a comment - This is because you're allowing Unity to exit without throwing an error. If you've written your own Automation script in Unity to build the apk, you should capture and check the returned string from BuildPipeline.BuildPlayer ( https://docs.unity3d.com/ScriptReference/BuildPipeline.BuildPlayer.html ), and throw an exception if appropriate.

            lacostej lacostej
            jesterorb John Rodenburg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: