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

Conditional step not getting executed even when build step failed and both worst step and best step are marked as failed

    XMLWordPrintable

Details

    Attachments

      Issue Links

        Activity

          Steps:

          1. Create job1 with build step "Execute shell". give a non-existent command eg "dat"
          2. create job2 with build step as "Execute shell" and command step as "date"
          3. Now configure job1
          4. Add conditional step as

          Run: current Build Status

          worst status: failed

          best status: failed

          Builder: Call/Trigger builts on other projects

          projects to build : job2

           

          Expectation: Build step of job1 will fail and since in conditional step job status will be failed job2 should be auto triggered.

          Actual:Job 2 is not autotriggered

           

          sdchhabaria Saral Chhabaria added a comment - Steps: Create job1 with build step "Execute shell". give a non-existent command eg "dat" create job2 with build step as "Execute shell" and command step as "date" Now configure job1 Add conditional step as Run: current Build Status worst status: failed best status: failed Builder: Call/Trigger builts on other projects projects to build : job2   Expectation: Build step of job1 will fail and since in conditional step job status will be failed job2 should be auto triggered. Actual:Job 2 is not autotriggered  

          Scenario:

          Best case and worst case marked as failed .

          Build step fails

          Logs:

          [Current build status] check if current [FAILURE] is worse or equals then [FAILURE] and better or equals then [FAILURE]
          Run condition [Current build status] enabling perform for step [Builder to mark whether executed]
          Finished: FAILURE

           

          Scenario:

          Best case and worst case marked as Success.

          Build step succeeds.

          Logs:

          [Current build status] check if current [SUCCESS] is worse or equals then [SUCCESS] and better or equals then [SUCCESS]
          Run condition [Current build status] enabling perform for step [Trigger/call builds on other projects]
          Triggering projects: testJob2
          [Current build status] check if current [SUCCESS] is worse or equals then [SUCCESS] and better or equals then [SUCCESS]
          Run condition [Current build status] enabling perform for step [Builder to mark whether executed]
          Finished: SUCCESS

           

          For second scenario job2 is triggered, but in first scenario though conditions satisfy why the job is not triggered??

          sdchhabaria Saral Chhabaria added a comment - Scenario: Best case and worst case marked as failed . Build step fails Logs: [Current build status] check if current [FAILURE] is worse or equals then [FAILURE] and better or equals then [FAILURE] Run condition [Current build status] enabling perform for step [Builder to mark whether executed] Finished: FAILURE   Scenario: Best case and worst case marked as Success. Build step succeeds. Logs: [Current build status] check if current [SUCCESS] is worse or equals then [SUCCESS] and better or equals then [SUCCESS] Run condition [Current build status] enabling perform for step [Trigger/call builds on other projects] Triggering projects: testJob2 [Current build status] check if current [SUCCESS] is worse or equals then [SUCCESS] and better or equals then [SUCCESS] Run condition [Current build status] enabling perform for step [Builder to mark whether executed] Finished: SUCCESS   For second scenario job2 is triggered, but in first scenario though conditions satisfy why the job is not triggered??

          I also experience the issue with [Current build status] option.

          It doesn't continue if previous step gets FAILURE status.

          Thanks for fixing.

          pignatenko Paul Ignatenko added a comment - I also experience the issue with  [Current build status] option. It doesn't continue if previous step gets FAILURE status. Thanks for fixing.

          People

            domi Dominik Bartholdi
            sdchhabaria Saral Chhabaria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: