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

When condition for Changeset with comparator

    Details

    • Similar Issues:
    • Released As:
      1.5.0

      Description

      https://issues.jenkins-ci.org/browse/JENKINS-48523  added support to the tag when condition with the comparator. 

      At the moment, the changeset when condition does support GLOB, but no REGEXP patterns. Let's standardize the changeset condition format as done with the tag condition.

      when {
          changeset "**/*.java"
      }
      when {
          changeset pattern: "**/*.java", comparator: "GLOB"
      } 
      when {
          changeset pattern: ".*\\.java", comparator: "REGEXP"
      } 

        Attachments

          Issue Links

            Activity

            Hide
            jonathand131 Jonathan Delizy added a comment -

            The v1.5.0 of pipeline-model-definition-plugin is released and include implementation of this ticket but documentation has not been updated.
            This cause confusion for people like me who update the plugin, have failed builds caused by this breaking change and found contradictory information between the error message and current documentation.

            I have previously seen alerts in the Update Center about possible incompatible configuration before updating some plugins. It could have been a good idea to use the same thing to alert user of this breaking change before they update.

            Show
            jonathand131 Jonathan Delizy added a comment - The v1.5.0 of pipeline-model-definition-plugin is released and include implementation of this ticket but documentation has not been updated. This cause confusion for people like me who update the plugin, have failed builds caused by this breaking change and found contradictory information between the error message and current documentation. I have previously seen alerts in the Update Center about possible incompatible configuration before updating some plugins. It could have been a good idea to use the same thing to alert user of this breaking change before they update.
            Hide
            v2v Victor Martinez added a comment -

            Jonathan Delizy, may I ask you to raise another ticket with the details of the error?

             

            For the docs:
            https://github.com/jenkins-infra/jenkins.io/pull/2664

            Show
            v2v Victor Martinez added a comment - Jonathan Delizy , may I ask you to raise another ticket with the details of the error?   For the docs: -  https://github.com/jenkins-infra/jenkins.io/pull/2664
            Hide
            jonathand131 Jonathan Delizy added a comment -

            Victor Martinez:
            Thanks for the update of the documentation.
            It is not yet visible on https://jenkins.io/doc/book/pipeline/syntax/#when but I think it is a matter of time since the PR is merged.

            About the error, it is that the syntax changeset glob: "*/.java" is not supported anymore, glob must be replaced by pattern.
            This syntax was in the example on the documentation page.
            It is the consequence of this ticket. I suppose it is intentional so I don't think I need to open a bug for that. Should I ?

            Show
            jonathand131 Jonathan Delizy added a comment - Victor Martinez : Thanks for the update of the documentation. It is not yet visible on https://jenkins.io/doc/book/pipeline/syntax/#when but I think it is a matter of time since the PR is merged. About the error, it is that the syntax changeset glob: "* / .java" is not supported anymore, glob must be replaced by pattern . This syntax was in the example on the documentation page. It is the consequence of this ticket. I suppose it is intentional so I don't think I need to open a bug for that. Should I ?

              People

              • Assignee:
                v2v Victor Martinez
                Reporter:
                v2v Victor Martinez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: