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

Add exclusion regions in TFS polling and checkout

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • tfs-plugin
    • None
    • Platform: All, OS: All

      In the Hudson tfs plug-in you only can configure the project path, whilst in
      cruisecontrol.net you can configure path(s) that are excluded from this project
      path when detecting modifications and checking out. For the CVS SCM plugni this
      is already possible, it would be nice to also have this functionality in hudson.

      For example: (cruise control.net configuration)
      <sourcecontrol type="filtered">
      <sourceControlProvider type="vsts" autoGetSource="true"
      applyLabel="false">
      <server>http://tfs_server:8080</server>
      <username>username</username>
      <password>***</password>
      <domain>mydomain</domain>
      <project>$/Content Manager/Main</project>
      <workingDirectory>D:\CM</workingDirectory>
      <cleanCopy>true</cleanCopy>
      <workspace>workspace name</workspace>
      <deleteWorkspace>false</deleteWorkspace>
      </sourceControlProvider>

      <exclusionFilters>
      <pathFilter>

      <pattern>$/Products/Main/Build/CruiseControl.NET/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/Build/MasterBuild/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/LegacyTest/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/Documentation/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/Source/FunctionalTests/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/Source/Tools/Debug
      Clients/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/Source/Tools/Test
      Clients/*/.*</pattern>
      </pathFilter>
      <pathFilter>
      <pattern>$/Products/Main/Source/Tools/Misc/*/.*</pattern>
      </pathFilter>
      </exclusionFilters>
      </sourcecontrol>

          [JENKINS-4709] Add exclusion regions in TFS polling and checkout

          renarj created issue -

          k0de added a comment -

          Our projects have a nested directory structure and would avoid building projects without source delta with exclusionpaths.

          k0de added a comment - Our projects have a nested directory structure and would avoid building projects without source delta with exclusionpaths.

          redsolo added a comment -

          Hi

          Any idea on how the CC excludes certain files and folders? Ive checked the documentation for the get command and there does not seem to be an exclude option.

          redsolo added a comment - Hi Any idea on how the CC excludes certain files and folders? Ive checked the documentation for the get command and there does not seem to be an exclude option.

          TeamCity also allows exclusion of certain paths. This is configured through "Checkout Rules" - http://confluence.jetbrains.net/display/TCD65/VCS+Checkout+Rules - I've used it and it works perfectly. I am not sure how it works, but I know that TFS UI supports a "masking" option, which might propagate to your workspace settings (not sure). You can check out the workspace config file(s) under %LocalAppData%\Microsoft\Team Foundation\<version>\Cache, with version being 1.0 for 2005, 2.0 for 2008, 3.0 for 2010...

          Merlyn Morgan-Graham added a comment - TeamCity also allows exclusion of certain paths. This is configured through "Checkout Rules" - http://confluence.jetbrains.net/display/TCD65/VCS+Checkout+Rules - I've used it and it works perfectly. I am not sure how it works, but I know that TFS UI supports a "masking" option, which might propagate to your workspace settings (not sure). You can check out the workspace config file(s) under %LocalAppData%\Microsoft\Team Foundation\<version>\Cache, with version being 1.0 for 2005, 2.0 for 2008, 3.0 for 2010...

          Check out the get options that allow you to specify multiple "itemspecs", to only to get certain files, and the option to preview a get: http://msdn.microsoft.com/en-us/library/fx7sdeyf.aspx . This could allow you to do a preview, filter, then get individual items that weren't filtered out. A little messier and less reliable, because someone could theoretically delete the files between you doing the preview and you doing the get. Also check out this info on cloaking from the command line: http://msdn.microsoft.com/en-us/library/0fa04bx6.aspx

          Merlyn Morgan-Graham added a comment - Check out the get options that allow you to specify multiple "itemspecs", to only to get certain files, and the option to preview a get: http://msdn.microsoft.com/en-us/library/fx7sdeyf.aspx . This could allow you to do a preview, filter, then get individual items that weren't filtered out. A little messier and less reliable, because someone could theoretically delete the files between you doing the preview and you doing the get. Also check out this info on cloaking from the command line: http://msdn.microsoft.com/en-us/library/0fa04bx6.aspx

          Mike Elkin added a comment -

          Added a pull request for basic exclusion region support based off the SVN implementation:
          https://github.com/hokatichenci/tfs-plugin/commit/6e7afd9b665560258a2689ee15e72f1a73ac5e52

          Mike Elkin added a comment - Added a pull request for basic exclusion region support based off the SVN implementation: https://github.com/hokatichenci/tfs-plugin/commit/6e7afd9b665560258a2689ee15e72f1a73ac5e52

          Brett Rogers added a comment -

          Any idea when Mike's pull request might be addressed? We could really use this functionality.

          Brett Rogers added a comment - Any idea when Mike's pull request might be addressed? We could really use this functionality.

          qing dai added a comment -

          anyway to fasten the process of release of TFS plugin?

          qing dai added a comment - anyway to fasten the process of release of TFS plugin?

          Kyle O'Connor added a comment - - edited

          I don't think the patch based on the SVN impl is the way to go. This needs to be implemented using TFS "cloaking". See here: http://msdn.microsoft.com/en-us/library/ms181378(v=vs.100).aspx

          The Jenkins TFS SCM plugin configuration page should simply ask for a list of folders (TFS Server paths) you want to be excluded from the SCM checkout and then run the tf workfold /cloak command on this folder list. It only has to be run once when the workspace is initially created (unless the configuration changes, but since this plugin already supports recreating the workspace in that case, you would also just make the call to cloak all folders again at that point). See here for the command syntax: http://msdn.microsoft.com/en-us/library/0fa04bx6(v=vs.100).aspx

          This should be pretty simple to implement. Let me know if there are other questions about TFS SCM.

          Kyle O'Connor added a comment - - edited I don't think the patch based on the SVN impl is the way to go. This needs to be implemented using TFS "cloaking". See here: http://msdn.microsoft.com/en-us/library/ms181378(v=vs.100).aspx The Jenkins TFS SCM plugin configuration page should simply ask for a list of folders (TFS Server paths) you want to be excluded from the SCM checkout and then run the tf workfold /cloak command on this folder list. It only has to be run once when the workspace is initially created (unless the configuration changes, but since this plugin already supports recreating the workspace in that case, you would also just make the call to cloak all folders again at that point). See here for the command syntax: http://msdn.microsoft.com/en-us/library/0fa04bx6(v=vs.100).aspx This should be pretty simple to implement. Let me know if there are other questions about TFS SCM.

          There is a new pull request (https://github.com/jenkinsci/tfs-plugin/pull/28) that implements this with workspace cloaking.

          Aaron Alexander added a comment - There is a new pull request ( https://github.com/jenkinsci/tfs-plugin/pull/28 ) that implements this with workspace cloaking.

            renarj renarj
            renarj renarj
            Votes:
            12 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: