Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment: Artifact copying mechanic changed/inconsistent with docs #593

Open
hvoigt opened this issue Feb 4, 2019 · 4 comments
Open

Comments

@hvoigt
Copy link

hvoigt commented Feb 4, 2019

I used to use relative paths when copying artefacts from the builder to a public folder via scp. This seems now impossible since a '/' is always prepended on whats specified with deploy/folder.

Another thing, that made me write this issue, is this paragraph in the docs:
https://github.com/appveyor/website/blob/master/src/docs/deployment/ftp.md#copy-artifacts-to-remote-ftp-location

This also does not seem to be true anymore. My artefacts now get copied directly underneath the specified remote folder instead of preserving the artifact folder structure as described here.

Were these changes deliberate? Maybe the documentation needs to be adjusted?

@IlyaFinkelshteyn
Copy link
Contributor

Hmm, FTP deployment did not changed recently. Can you please provide more specific examples of the issue, with YAML configurations and maybe links to the "good" and "bad" builds? If you are not comfortable to publish it here, feel free to send to [email protected].

@hvoigt
Copy link
Author

hvoigt commented Feb 7, 2019

Ok I investigated more into it. You are right it did not change. It is only the Linux deploy that is behaving differently. I was wondering that today the windows build went to a completely different location. So the following seems to be true:

On Windows for absolute paths in the sftp target configuration. The leading '/' is stripped and thus the path is made relative.

On Linux a leading '/' is always prefixed and thus the target path for sftp is always absolute. Additionally the path of the artifact inside the repository, which is what I referenced from the documentation, is also stripped.

Does that make sense or should I provide more specifics?

@hvoigt
Copy link
Author

hvoigt commented Feb 22, 2019

Can you reproduce this? FWIW here is my workaround appveyor.yml snippet to get Windows and Linux deploy in the same folder:

deploy:
- provider: FTP
  host: host.example.com
  protocol: sftp
  username: user
  password:
    secure: XXXXXXX
  folder: release
  on:
    branch: release
    APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- provider: FTP
  host: host.example.com
  protocol: sftp
  username: user
  password:
    secure: XXXXXXX
  folder: /home/user/release/installer
  on:
    branch: release
    APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu

When using the Windows version with Linux it would try to deploy in /release. When using the Linux version with Windows it would try to deploy in /home/user/home/user/release/installer.

And that seems deliberate. I could not get Windows to use an absolute path and for Linux it is the opposite you can not get it to use a relative path. Interestingly when the path is already in the form the system seems to expect the beginning '/' is neither added nor stripped for both.

@IlyaFinkelshteyn
Copy link
Contributor

@hvoigt sorry for delay with answer and thank you for the catch. Another temporary workaround is to use Environment deployment, which behaves the same way as on Windows builds. Difference between Environment and Inline deployments is here.

Right now we are working on migration to the same (.NET Core based) code base for both Windows and Linux build agents. This issue will be fixed as part of this job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants