I have hidden dotfiles in my dist/ directory that need to get copied to the server. My deployment step looks like this:
name: Deploy to development server
deployment: development
script:
- pipe: atlassian/scp-deploy:1.0.1
variables:
USER: $SSH_USER
SERVER: $SSH_HOST
REMOTE_PATH: $TARGET_PATH
LOCAL_PATH: 'dist/*'
But this setup will (understandably) not copy dotfiles to the server. There are two possible solutions that come to my mind:
What is best practice in this case? How could it be done?
Thanks in advance!
@Thomas Schmitt dist/* is not counting hidden files in bash.
You can use
LOCAL_PATH: 'dist/'
to take into account hidden files.
Or if that does create a redundant folder for you, you can actually cd to your dist before using the pipe and use not dist, but '.' or './' as LOCAL_PATH there
Looking forward to see your feedback about user expirience.
We try to improve Bitbucket Pipelines and Pipes and the same time to be flexible for as more users as possible.
Regards, Galyna
Hi Galyna and thanks for your reply. Sadly this doesn't solve the issue, since scp seems to have a problem with the paths '.' and './':
scp: error: unexpected filename: .
x Deployment failed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay I actually managed to solve this issue for my case. Instead of the scp pipeline, I simply replaced the scp pipeline with the rsync pipeline which is more accommodating when it comes to path names:
- step:
name: Deploy to development server
deployment: development
script:
- pipe: atlassian/rsync-deploy:0.5.0
variables:
USER: $WEBGO_SSH_USER
SERVER: $WEBGO_SSH_HOST
REMOTE_PATH: $DEV_TARGET_PATH
LOCAL_PATH: 'dist/'
And that did the trick. Sorry I didn't find a general solution to this problem. As it's more of an scp-problem, I'm sure there is a work-around, I'm just not sure it's worth the hassle.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Thomas Schmitt yeap, we actually recommend to use rsync more, since it is more optimized and copies files faster,, when there are many .
However, We will reproduce this in scp deploy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.