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

          danielbeck Daniel Beck added a comment - ikedam Consider declaring configuration incompatibility so users know their jobs may behave differently. https://wiki.jenkins-ci.org/display/JENKINS/Marking+a+new+plugin+version+as+incompatible+with+older+versions Examples: https://github.com/jenkinsci/ldap-plugin/blob/master/pom.xml#L121 https://github.com/jenkinsci/build-flow-plugin/blob/master/pom.xml#L106

          I know that i can use, i don't appreciate breaking current setups when any behaviour can be achieved in current functionality. All was needed is a help file with description. Also such destroying change can have readResolve() for splitting current configuration. But my opinion is now -1 for such style changes.

          integer Kanstantsin Shautsou added a comment - I know that i can use, i don't appreciate breaking current setups when any behaviour can be achieved in current functionality. All was needed is a help file with description. Also such destroying change can have readResolve() for splitting current configuration. But my opinion is now -1 for such style changes.

          Code changed in jenkins
          User: ikedam
          Path:
          pom.xml
          http://jenkins-ci.org/commit/flexible-publish-plugin/bc5e694170d0a3d1f52955634e1fa8cfbd718210
          Log:
          JENKINS-27171 Displays compatibility warnings in the update center for flexible-publish < 0.15.

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: pom.xml http://jenkins-ci.org/commit/flexible-publish-plugin/bc5e694170d0a3d1f52955634e1fa8cfbd718210 Log: JENKINS-27171 Displays compatibility warnings in the update center for flexible-publish < 0.15.

          Code changed in jenkins
          User: ikedam
          Path:
          pom.xml
          http://jenkins-ci.org/commit/flexible-publish-plugin/6ce459851649d8858a8646cbc95e01ba92faf143
          Log:
          Merge pull request #13 from ikedam/feature/JENKINS-27171_CompatibleSinceVersion0.15

          JENKINS-27171 Displays compatibility warnings in the update center for flexible-publish < 0.15.

          Compare: https://github.com/jenkinsci/flexible-publish-plugin/compare/f4c0283c6252...6ce459851649

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: pom.xml http://jenkins-ci.org/commit/flexible-publish-plugin/6ce459851649d8858a8646cbc95e01ba92faf143 Log: Merge pull request #13 from ikedam/feature/ JENKINS-27171 _CompatibleSinceVersion0.15 JENKINS-27171 Displays compatibility warnings in the update center for flexible-publish < 0.15. Compare: https://github.com/jenkinsci/flexible-publish-plugin/compare/f4c0283c6252...6ce459851649
          ikedam ikedam added a comment -

          Released 0.15.1, which displays the compatibility warning for flexible-publish 0.14.1 and earlier. It will be available in a day.
          I decided to release that immediately as the compatibility warning is useful for users only before they upgrade flexible-publish to 0.15.

          ikedam ikedam added a comment - Released 0.15.1, which displays the compatibility warning for flexible-publish 0.14.1 and earlier. It will be available in a day. I decided to release that immediately as the compatibility warning is useful for users only before they upgrade flexible-publish to 0.15.

          People

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

            Dates

              Created:
              Updated:
              Resolved: