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

Re: hudson plugins: SCP, CIFS folder tree patterns

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • cifs-plugin
    • None

      context:

      ##########################################

      http://wiki.jenkins-ci.org/display/JENKINS/CIFS-Publisher+Plugin?focusedCommentId=46334729#comment-46334729

      ##########################################

      Plugin ID cifs
      Latest Release 1.1.4
      Latest Release Date Aug 11, 2010
      Changes via Fisheye In Latest Release
      Since Latest Release
      Maintainer(s) n/a (id: acearl)
      Issue Tracking Open Issues

      ##########################################

      Please file a JIRA issue on this and I'll take a look.

      On Thu, Aug 12, 2010 at 11:57 AM, Andrei Pozolotin
      <andrei.pozolotin@gmail.com> wrote:
      > > Slide hi;
      > >
      > > Thank you for getting back;
      > >
      > > what I see actually is flattening happening with patten like this:
      > > "dir/**"
      > >
      > > and I can not find any ant pattern that would work in CIFS and would do NO
      > > flattening;
      > >
      > > cheers,
      > >
      > > Andrei
      > >
      > > -------- Original Message --------
      > > Subject: Re: hudson plugins: SCP, CIFS folder tree patterns
      > > From: Slide <slide.o.mix@gmail.com>
      > > To: Andrei Pozolotin <andrei.pozolotin@gmail.com>
      > > Cc: Kohsuke Kawaguchi <kk@kohsuke.org>, Ramil Israfilov
      > > <ramazanyich@gmail.com>
      > > Date: Thu 12 Aug 2010 12:00:06 PM CDT
      > >
      > > Andrei,
      > >
      > > The CIFS plugin does not support flattening like the scp plugin does,
      > > in general it should copy the directory tree structure as is to the
      > > destination.
      > >
      > > Thanks,
      > >
      > > slide
      > >
      > > On Thu, Aug 12, 2010 at 9:58 AM, Andrei Pozolotin
      > > <andrei.pozolotin@gmail.com> wrote:
      > >
      > >
      > > Kohsuke hello;
      > >
      > > can you please take a look on these:
      > >
      > > http://wiki.jenkins-ci.org/display/JENKINS/SCP+plugin?focusedCommentId=46334733#comment-46334733
      > >
      > > http://wiki.jenkins-ci.org/display/JENKINS/CIFS-Publisher+Plugin?focusedCommentId=46334729#comment-46334729
      > >
      > > apparently both SCP and CIFS rely on the same underlying features of hudson
      > > core;
      > >
      > > can you please clarify how to use it properly?
      > >
      > > Thank you,
      > >
      > > Andrei
      > >
      > > ####################################
      > >
      > > COPY AND KEEP THE TREE?
      > >
      > > currently, if you have on source:
      > >
      > > dir1/dir2/dir3
      > >
      > > and you specify:
      > >
      > > source: "dir1/**"
      > >
      > > destination "dir"
      > >
      > > then all contents of all folders on the source "dir1/dir2/dir3" will be
      > > flattened (merge+overwrite) inside destination "dir";
      > >
      > > how can you copy and preserve directory tree?
      > >
      > > ####################################
      > >
      > >
      > >
      > >
      > >
      > >
      > >

      – slide-o-blog http://slide-o-blog.blogspot.com/

          [JENKINS-7197] Re: hudson plugins: SCP, CIFS folder tree patterns

          Alex Earl added a comment -

          Since I don't own the SCP plugin, I can only make fixes for the CIFS plugin, but since the CIFS plugin is heavily based on the SCP plugin code, the fix should be roughly the same.

          Alex Earl added a comment - Since I don't own the SCP plugin, I can only make fixes for the CIFS plugin, but since the CIFS plugin is heavily based on the SCP plugin code, the fix should be roughly the same.

          do you know the author of SCP plugin?

          Andrei Pozolotin added a comment - do you know the author of SCP plugin?

          Alex Earl added a comment -

          From what I can gather (and I am fairly new to Hudson/Java dev), Ant file patterns are meant to flatten things, since it creates a list of files based on the pattern match. I will continue to look into possible solutions.

          Alex Earl added a comment - From what I can gather (and I am fairly new to Hudson/Java dev), Ant file patterns are meant to flatten things, since it creates a list of files based on the pattern match. I will continue to look into possible solutions.

          per this:
          the default is NOT to flatten:
          http://ant.apache.org/manual/Tasks/copy.html

          flatten

          Ignore the directory structure of the source files, and copy all files into the directory specified by the todir attribute. Note that you can achieve the same effect by using a flatten mapper.

          No; defaults to false.

          Andrei Pozolotin added a comment - per this: the default is NOT to flatten: http://ant.apache.org/manual/Tasks/copy.html flatten Ignore the directory structure of the source files, and copy all files into the directory specified by the todir attribute. Note that you can achieve the same effect by using a flatten mapper. No; defaults to false.

          Andrei Pozolotin added a comment - - edited

          attached:

          1. Zip Archive test-ant.zip (4 kB)

          eclipse project that shows ant copy "**" task which does not flatten directory tree

          Andrei Pozolotin added a comment - - edited attached: 1. Zip Archive test-ant.zip (4 kB) eclipse project that shows ant copy "**" task which does not flatten directory tree

          <?xml version="1.0" encoding="UTF-8"?>
          <project
          	name="Hello World"
          	default="Hello"
          	basedir=".">
          
          	<property
          		name="HelloText"
          		value="Hello" />
          
          	<target
          		name="Hello">
          		<echo>${HelloText}</echo>
          	</target>
          	
          	<delete dir="dir"/>
          
          	<copy
          		todir="dir">
          		<fileset
          			dir="dir1">
          			<include
          				name="**" />
          		</fileset>
          	</copy>
          
          </project>
          

          Andrei Pozolotin added a comment - <?xml version= "1.0" encoding= "UTF-8" ?> <project name= "Hello World" default = "Hello" basedir= "." > <property name= "HelloText" value= "Hello" /> <target name= "Hello" > <echo>${HelloText}</echo> </target> <delete dir= "dir" /> <copy todir= "dir" > <fileset dir= "dir1" > <include name= "**" /> </fileset> </copy> </project>

          Alex Earl added a comment -

          I took a look at the code for the ANT Copy task. This will be fairly involved to implement. I'll update the JIRA as progress is made.

          Alex Earl added a comment - I took a look at the code for the ANT Copy task. This will be fairly involved to implement. I'll update the JIRA as progress is made.

          I was thinking this is hudson core, provided by Kohsuke Kawaguchi; can you ask him?

          and this indeed is needed by many plugins; so if you fix CIFS - SCP is still broken?

          probably would be easier to introduce ant as dependency?

          Andrei Pozolotin added a comment - I was thinking this is hudson core, provided by Kohsuke Kawaguchi; can you ask him? and this indeed is needed by many plugins; so if you fix CIFS - SCP is still broken? probably would be easier to introduce ant as dependency?

          Alex Earl added a comment -

          The CIFS Publishere is now deprecated in favor of the publish-over-cifs plugin.

          Alex Earl added a comment - The CIFS Publishere is now deprecated in favor of the publish-over-cifs plugin.

            slide_o_mix Alex Earl
            andrei_pozolotin Andrei Pozolotin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: