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

Conditional build step plugin does not mark build a s unstable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Windows
      Jenkins ver. 1.651.2
      conditional-buildstep 1.3.3

      "Conditional build step-single" shows nice field:
      "On evaluation failure" with options "Fail the build" or mark build as unstable.

      Unfortunatly this is not working.
      Example 1
      Run? = Never
      On evaluation failure = "Mark the build unstable"
      Builder = "Execute windows batch command"
      Command = "echo run builder"

      It should mark all builds as unstable and not run the builder.
      It does not run builder but does not mark build as unstable.

      Example 2 - more reliable
      Run? = Execute Windows batch Command
      Command = which notinpath
      On evaluation failure = "Mark the build unstable"
      Builder = "Execute Windows batch Command"
      Command = echo builder

      notinpath is not in my path, so evaluation should fail - it does.
      Build should be marked as unstable - it is not.
      Echo builder should not be runned - it is not.

      It Shouls mark all builds as unstable - but it does not.

          [JENKINS-34971] Conditional build step plugin does not mark build a s unstable

          Roman Wieczorek added a comment - - edited

          I think documentation is missleading. What does mean that evaluation failures?
          Does not it return a bolean value allways?

          Roman Wieczorek added a comment - - edited I think documentation is missleading. What does mean that evaluation failures? Does not it return a bolean value allways?

          Currently docs says:
          "If the evaluation of a run condition fails, should the build fail, be marked unstable, run the build step ...
          A run condition evaluation may fail to run cleanly - especially if it is dependent on expanding tokens provided by the Token Macro Plugin and the values are expected to be present or look like a certain type i.e. be a number."

          Maybe it could be:
          "Action to take when can not evaluate condition - this is not same as evaluating to false.

          Should the builder run? Build marked as failed or unstable?

          A run condition evaluation may fail to run cleanly - especially if it is dependent on expanding tokens provided by the Token Macro Plugin and the values are expected to be present or look like a certain type i.e. be a number."
          "

          Roman Wieczorek added a comment - Currently docs says: "If the evaluation of a run condition fails, should the build fail, be marked unstable, run the build step ... A run condition evaluation may fail to run cleanly - especially if it is dependent on expanding tokens provided by the Token Macro Plugin and the values are expected to be present or look like a certain type i.e. be a number." Maybe it could be: "Action to take when can not evaluate condition - this is not same as evaluating to false. Should the builder run? Build marked as failed or unstable? A run condition evaluation may fail to run cleanly - especially if it is dependent on expanding tokens provided by the Token Macro Plugin and the values are expected to be present or look like a certain type i.e. be a number." "

          Ajay Kumar added a comment - - edited

          Experiencing the same issue (see attached screenshot and logs) where the build is not marked failed even if the condition fails.

           

          10:14:23 [test] $ /bin/bash /apps/instances/jenkins/temp/CommandInterpreterCondition4832653641132345461.sh
          10:14:23 ERROR: Please remove '.en' at the end of SOLUTION name platform.en
          10:14:23 Run condition [Not] preventing perform for step [Copy Job]
          10:14:23 Started calculate disk usage of build
          10:14:23 Finished Calculation of disk usage of build in 0 seconds
          10:14:23 Started calculate disk usage of workspace
          10:14:23 Finished Calculation of disk usage of workspace in 0 seconds
          10:14:23 Finished: SUCCESS 

           

          Ajay Kumar added a comment - - edited Experiencing the same issue (see attached screenshot and logs) where the build is not marked failed even if the condition fails.   10:14:23 [test] $ /bin/bash /apps/instances/jenkins/temp/CommandInterpreterCondition4832653641132345461.sh 10:14:23 ERROR: Please remove '.en' at the end of SOLUTION name platform.en 10:14:23 Run condition [Not] preventing perform for step [Copy Job] 10:14:23 Started calculate disk usage of build 10:14:23 Finished Calculation of disk usage of build in 0 seconds 10:14:23 Started calculate disk usage of workspace 10:14:23 Finished Calculation of disk usage of workspace in 0 seconds 10:14:23 Finished: SUCCESS  

          Curtis added a comment -

          I linked in JENKINS-24242 because it has a suggested workaround that might help until this issue is resolved. 

          Even with the workaround, I vote for this being fixed. The workaround is a bit of a hack.

          Curtis added a comment - I linked in JENKINS-24242 because it has a suggested workaround that might help until this issue is resolved.  Even with the workaround, I vote for this being fixed. The workaround is a bit of a hack.

            Unassigned Unassigned
            fantastory Roman Wieczorek
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: