• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • copy-to-slave-plugin
    • None

      I am not able to get the copy-to-slave plugin transfer the contents of the CVS directory located into my workspace root (CVS metadata files). I suppose this could be related to the ANT default excludes feature.

      Could you please add a way to copy even files excluded by default? (or document the existing one...)

          [JENKINS-7999] Add a way to override "default excludes"

          Romain Seguy added a comment -

          I'm not sure to fully understand what you mean. May you detail your configuration please?

          Romain Seguy added a comment - I'm not sure to fully understand what you mean. May you detail your configuration please?

          davidecavestro added a comment - - edited

          Hi rseguy, and many thanks for your fast reply.

          I have a free-style Hudson job with a workspace containing the checkout of a CVS module. The job can only do a cvs update (doing a cvs checkout from Hudson is not an option here), so the checkout is done (outside Hudson) only at job creation time.

          To distribute the job to a slave node, I have to replicate some files not under version control and at least that part of the workspace containing some minimal data to let hudson do a cvs update: the CVS working copy files are these minimal data.

          My workspace structure is something like

          .
          |-- CVS                         -> CVS working copy files
          |   |-- Entries
          |   |-- Repository
          |   |-- Root
          |   `-- Tag
          |-- ant-lib
          |   `-- foo
          |-- .cvsignore
          |-- build.xml
          |-- defaults.xml
          |-- overrides.xml
          |-- prefs-TEMPLATE.properties
          |-- prefs.properties
          `-- was_jspc.sh
          

          So when I set something like CVS/*,ant-lib/*,* in the Files to copy field (under the Copy files to slave node before building section of my free-style job) Hudson complains 'CVS/*' doesn't match anything, but '*' does. Perhaps that's what you mean?.
          In fact, if I continue launching the job it doesn't copy to the slave any contents from the CVS directory, hence I end up with a slave workspace whose contents are:

          .
          |
          |                               -> CVS working copy files MISSING here
          |
          |-- ant-lib
          |   `-- foo
          |                               -> .cvsignore file MISSING here
          |-- build.xml
          |-- defaults.xml
          |-- overrides.xml
          |-- prefs-TEMPLATE.properties
          |-- prefs.properties
          `-- was_jspc.sh
          

          This prevents a successful execution of the job on the slave node, since it needs at least those files (even the missing ones) to execute.

          I guess the CVS directory contents and the .cvsignore fire aren't copied since they match the ANT default excludes (maybe it could happens if the plugin uses the ANT API to do the copy)...

          The ANT default excludes contains - among others - the following patterns

          **/CVS
          **/CVS/**
          **/.cvsignore
          

          it's only a guess, since I've seen that even the Files Found Trigger plugin says on the Release History for release 1.1
          By default, no files are ignored. Previous releases ignored all files in the Ant default excludes.

          That said I'd need a way to let the plugin copy even my CVS dir contents.
          Please let me know if I've not been clear.

          Kind Regards
          Davide

          UPDATE: I noticed that even the .cvsignore file isn't copied, so I integrated this comment to reflect it.

          davidecavestro added a comment - - edited Hi rseguy, and many thanks for your fast reply. I have a free-style Hudson job with a workspace containing the checkout of a CVS module. The job can only do a cvs update (doing a cvs checkout from Hudson is not an option here), so the checkout is done (outside Hudson) only at job creation time. To distribute the job to a slave node, I have to replicate some files not under version control and at least that part of the workspace containing some minimal data to let hudson do a cvs update : the CVS working copy files are these minimal data. My workspace structure is something like . |-- CVS -> CVS working copy files | |-- Entries | |-- Repository | |-- Root | `-- Tag |-- ant-lib | `-- foo |-- .cvsignore |-- build.xml |-- defaults.xml |-- overrides.xml |-- prefs-TEMPLATE.properties |-- prefs.properties `-- was_jspc.sh So when I set something like CVS/*,ant-lib/*,* in the Files to copy field (under the Copy files to slave node before building section of my free-style job) Hudson complains 'CVS/*' doesn't match anything, but '*' does. Perhaps that's what you mean? . In fact, if I continue launching the job it doesn't copy to the slave any contents from the CVS directory, hence I end up with a slave workspace whose contents are: . | | -> CVS working copy files MISSING here | |-- ant-lib | `-- foo | -> .cvsignore file MISSING here |-- build.xml |-- defaults.xml |-- overrides.xml |-- prefs-TEMPLATE.properties |-- prefs.properties `-- was_jspc.sh This prevents a successful execution of the job on the slave node, since it needs at least those files (even the missing ones) to execute. I guess the CVS directory contents and the .cvsignore fire aren't copied since they match the ANT default excludes (maybe it could happens if the plugin uses the ANT API to do the copy)... The ANT default excludes contains - among others - the following patterns **/CVS **/CVS/** **/.cvsignore it's only a guess, since I've seen that even the Files Found Trigger plugin says on the Release History for release 1.1 By default, no files are ignored. Previous releases ignored all files in the Ant default excludes . That said I'd need a way to let the plugin copy even my CVS dir contents. Please let me know if I've not been clear. Kind Regards Davide UPDATE: I noticed that even the .cvsignore file isn't copied, so I integrated this comment to reflect it.

          Added an archive containing an example workspace, only to show the directory structure.
          The plugin doesn't copy the contents for the CVS dir, even using a file match pattern like CVS/*,ant-lib/*,* that should include that dir...

          davidecavestro added a comment - Added an archive containing an example workspace, only to show the directory structure. The plugin doesn't copy the contents for the CVS dir, even using a file match pattern like CVS/*,ant-lib/*,* that should include that dir...

          Romain Seguy added a comment -

          Thanks for the very complete comment. I'll be able to easily replicate what has been done in the Files Found Trigger plugin (based on the changeset).

          Romain Seguy added a comment - Thanks for the very complete comment. I'll be able to easily replicate what has been done in the Files Found Trigger plugin (based on the changeset ).

          Romain Seguy added a comment -

          Hmmm, no, I've talked too fast, I need to apply the patch on Hudson's code side.

          Romain Seguy added a comment - Hmmm, no, I've talked too fast, I need to apply the patch on Hudson's code side.

          Hi rseguy,
          any news?

          davidecavestro added a comment - Hi rseguy, any news?

          Romain Seguy added a comment -

          Cf. http://ant.apache.org/manual/dirtasks.html for a list of all files excluded by default.

          Romain Seguy added a comment - Cf. http://ant.apache.org/manual/dirtasks.html for a list of all files excluded by default.

          Romain Seguy added a comment -

          Fixed in 1.2.2.

          Romain Seguy added a comment - Fixed in 1.2.2.

          Now it works like a charm,
          many thanks Romain!

          Cheers
          Davide

          davidecavestro added a comment - Now it works like a charm, many thanks Romain! Cheers Davide

          I suspect some kind of regression, cause:

          • upgrading to release 1.2.3 this issue comes out again
          • downgrading to release 1.2.2 it remains NOT MORE reproducible

          Running on Hudson ver. 1.389

          davidecavestro added a comment - I suspect some kind of regression, cause: upgrading to release 1.2.3 this issue comes out again downgrading to release 1.2.2 it remains NOT MORE reproducible Running on Hudson ver. 1.389

          Romain Seguy added a comment -

          Have you checked the new corresponding option in the Advanced section?

          Romain Seguy added a comment - Have you checked the new corresponding option in the Advanced section?

          Nope. I didn't notice the new option Include Ants default excludes in the Advanced section.
          Checking that option everything works fine.
          I got sidetracked cause the default behavior changed from 1.2.2 to 1.2.3.

          Please tell me if I have to set issue status by myself to resolved or if you want to do it.
          Sorry!!!

          Cheers
          Davide

          davidecavestro added a comment - Nope. I didn't notice the new option Include Ants default excludes in the Advanced section. Checking that option everything works fine. I got sidetracked cause the default behavior changed from 1.2.2 to 1.2.3. Please tell me if I have to set issue status by myself to resolved or if you want to do it. Sorry!!! Cheers Davide

          Romain Seguy added a comment -

          No problem.

          Romain Seguy added a comment - No problem.

          Looks like this might have been fixed properly in core via  https://github.com/jenkinsci/jenkins/commit/0725d2765da789e02914deb4893a449eeda6a820 which landed in jenkins-1.462

          Marcin Cieślak added a comment - Looks like this might have been fixed properly in core via  https://github.com/jenkinsci/jenkins/commit/0725d2765da789e02914deb4893a449eeda6a820 which landed in jenkins-1.462

          Related core issue (fixed)

          Marcin Cieślak added a comment - Related core issue (fixed)

            rseguy Romain Seguy
            davidecavestro davidecavestro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: