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

Exclude some patterns from triggering the build

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      In our project, we archive the artifacts inside the project by checking them in after a successful build
      having the job triggered by polling triggers the build again, which is unneeded in this case
      Can we add an exclude filter (like the current filter that exclude the check-out) in which we can add a pattern of files that not needed to trigger the build in case of being changed

      Thanks

        Attachments

          Activity

          Hide
          cdsouza Cletus D'Souza added a comment -

          This is already implemented. See include/exclude list under 'Advanced' settings for the Job configuration.

          Show
          cdsouza Cletus D'Souza added a comment - This is already implemented. See include/exclude list under 'Advanced' settings for the Job configuration.
          Hide
          peer Peer Mueller added a comment -

          We are also looking for this functionality. However the mentioned include/exclude paths that can be given under settings just define which files/paths are checked out. A build is triggered nevertheless, even when only the files in an excluded path have changed. This is not the desired behaviour which also the issue creator described.

          I am suggesting to change this behaviour that a build is only triggerred when there are changes in included paths/not in excluded paths.

          Show
          peer Peer Mueller added a comment - We are also looking for this functionality. However the mentioned include/exclude paths that can be given under settings just define which files/paths are checked out. A build is triggered nevertheless, even when only the files in an excluded path have changed. This is not the desired behaviour which also the issue creator described. I am suggesting to change this behaviour that a build is only triggerred when there are changes in included paths/not in excluded paths.
          Hide
          cdsouza Cletus D'Souza added a comment -

          As indicated originally, the plugin supports both include and exclude filters. When you configure the filter (include or exclude) correctly, it is passed on the 'si viewproject' command as illustrated below with an INCLUDE filter (--filter=file:*.java,file:pom.xml*):

          si viewproject --user=administrator --port=7001 --hostname=cdsouzaltw7 --recurse --project=#/Projects/IntegrityDocs --fields=name,context,cpid,memberrev,membertimestamp,memberdescription,type --filter=file:*.java,file:pom.xml
          

          The above command was extracted from the Jenkins Logs when a polling ran. If you are not seeing this behavior, then chances are:

          1. You have to configure the include/exclude filter correctly
          2. You're changing the filter too often (ex: build to build)?
          3. The viewproject command is not working correctly with the filter specified

          If you have an issues with the viewproject command not working correctly, then please make sure you are using a supported version of Integrity (10.5+). If you are on a supported version, then you'll need to reproduce the command (si viewproject) and submit an issue with PTC Customer Support as this is a problem with the command and not the plugin

          Show
          cdsouza Cletus D'Souza added a comment - As indicated originally, the plugin supports both include and exclude filters. When you configure the filter (include or exclude) correctly, it is passed on the 'si viewproject' command as illustrated below with an INCLUDE filter (--filter= file:*.java,file:pom.xml*): si viewproject --user=administrator --port=7001 --hostname=cdsouzaltw7 --recurse --project=#/Projects/IntegrityDocs --fields=name,context,cpid,memberrev,membertimestamp,memberdescription,type --filter=file:*.java,file:pom.xml The above command was extracted from the Jenkins Logs when a polling ran. If you are not seeing this behavior, then chances are: You have to configure the include/exclude filter correctly You're changing the filter too often (ex: build to build)? The viewproject command is not working correctly with the filter specified If you have an issues with the viewproject command not working correctly, then please make sure you are using a supported version of Integrity (10.5+). If you are on a supported version, then you'll need to reproduce the command (si viewproject) and submit an issue with PTC Customer Support as this is a problem with the command and not the plugin
          Hide
          cdsouza Cletus D'Souza added a comment -

          As of version 1.35, this behavior works as described in comments

          Show
          cdsouza Cletus D'Souza added a comment - As of version 1.35, this behavior works as described in comments
          Hide
          peer Peer Mueller added a comment -

          Thank you for quick reply. You are right the behaviour works as expected. It seems I changed the filter too often when trying it out.

          Show
          peer Peer Mueller added a comment - Thank you for quick reply. You are right the behaviour works as expected. It seems I changed the filter too often when trying it out.

            People

            • Assignee:
              cdsouza Cletus D'Souza
              Reporter:
              mharb Mohamed Harb
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: