SSH Upload Folders

Hey!

I'm totally failing to upload artifact folders via SSH. No matter what "Paths to sources" patterns I use, only files are transferred via SSH.

Not even +:**/* is working.

Does someone have an idea? Thanks!

0
6 comments

Hello Anton,

What is the structure of the artifacts in this build? What directory do you want to upload? If you want to upload all files into the directory, you can use the following Paths to sources: +:**/* => target_directory.

0
Avatar
Permanently deleted user

Hello Alina,

thank you for your response!

Unfortunately the problem persists. I have some .jars/.wars and javadoc folders(w/ many htmls) among the artifacts; everything is uploaded except for the folders – even with your pattern.

0

Could you please attach screenshot of the build step settings and full build log?

0
Avatar
Permanently deleted user

I am facing the same problem. I would like to upload a folder containing several subfolders and files as it is (i.e. recursively) to the given target dir. So assume the following setup:

Configured target dir: somehost:path/to/target/
Teamcity workdir contains: folder1 -> subfolder -> foo.txt, bar.txt
Paths to sources: folder1

Then I want to see after the upload the following files on "somehost" (with the directory structure preserved):

path -> to -> target -> folder1 -> subfolder -> foo.txt, bar.txt

However, for me the folder is completely ignored. When I try to upload single files everything works as expected.

How can I achieve this behavior?

 

0

Hi Johannes,

If you set "folder1" as the paths to sources, you will copy the *contents* of folder 1 (although subfolder should be copied as is, with its content). If you want it to hang from "folder1" on its target, you should basically add "folder1 => folder1" as the paths to sources. This should create folder1 on the target and copy the contents of folder1 to the target recursively.

0
Avatar
Permanently deleted user

We had the same issue. To be more precise with the following local file structure:

```

path/

  to/

    folder/

      file1.txt

      subfolder/

        file2.txt

```

and the following upload pattern:

```

path/to/folder/* => some-folder/

```

only `file1.txt` would be copied, `subfolder` wouldn't be:

```

some-folder/

  file1.txt

```

I think this is a bug.

 

I tried a bunch of patterns and ended up with one that worked:

```

path/to/folder => some-folder

```

this did the expected thing and ended up with

```

some-folder/

  file1.txt

  subfolder/

    file2.txt

```

0

Please sign in to leave a comment.