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

Conditions are evaluated for each actions

    XMLWordPrintable

Details

    Description

      Following case:

      Flexible Publish
          Conditional Action
              Run?: String match
                  String1: ${Test1}
                  String2: expected
              Action
                  some action 1
                  some action 2
      

      In this case, string matching is evaluated each for some action 1 and some action 2.
      The condition should be evaluated only one for the configuration as:

      • It can be a problem if there is a condition with side-effects.
      • Users can expect the condition will be evaluated only once as they configured that only once in the configuration page.
      • Users can configure like this if they really want the condition evaluated for each time:
        Flexible Publish
            Conditional Action
                Run?: String match
                    String1: ${Test1}
                    String2: expected
                Action
                    some action 1
            Conditional Action
                Run?: String match
                    String1: ${Test1}
                    String2: expected
                Action
                    some action 2
        

      Attachments

        Activity

          ikedam ikedam created issue -
          ikedam ikedam made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          ikedam ikedam made changes -
          Description Following case:
          {noformat}
          Flexible Publish
              Conditional Action
                  Run?: String match
                      String1: ${Test1}
                      String2: expected
                  Action
                      some action 1
                      some action 2

          In this case, string matching is evaluated each for some action 1 and some action 2.
          The condition should be evaluated only one for the configuration as:
          * It can be a problem if there is a condition with side-effects.
          * Users can expect the condition will be evaluated only once as they configured that only once in the configuration page.
          * Users can configure like this if they really want the condition evaluated for each time:
          {noformat}
          Flexible Publish
              Conditional Action
                  Run?: String match
                      String1: ${Test1}
                      String2: expected
                  Action
                      some action 1
              Conditional Action
                  Run?: String match
                      String1: ${Test1}
                      String2: expected
                  Action
                      some action 2
          {noformat}
          Following case:
          {noformat}
          Flexible Publish
              Conditional Action
                  Run?: String match
                      String1: ${Test1}
                      String2: expected
                  Action
                      some action 1
                      some action 2
          {noformat}

          In this case, string matching is evaluated each for some action 1 and some action 2.
          The condition should be evaluated only one for the configuration as:
          * It can be a problem if there is a condition with side-effects.
          * Users can expect the condition will be evaluated only once as they configured that only once in the configuration page.
          * Users can configure like this if they really want the condition evaluated for each time:
          {noformat}
          Flexible Publish
              Conditional Action
                  Run?: String match
                      String1: ${Test1}
                      String2: expected
                  Action
                      some action 1
              Conditional Action
                  Run?: String match
                      String1: ${Test1}
                      String2: expected
                  Action
                      some action 2
          {noformat}
          ikedam ikedam made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          ikedam ikedam made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 161368 ] JNJira + In-Review [ 208476 ]

          People

            ikedam ikedam
            ikedam ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: