Hello there community!
I am not able to get hidden files/dotfiles, or more specifically the .htaccess file, transferred over SFTP with the sftp-deploy:0.5.7 pipe.
My current script is this:
pipelines:
branches:
"develop":
- step:
name: Create staging build
caches:
- node
script:
- yarn
- yarn build
artifacts:
- build/**
- step:
name: Deploy to staging environment on --stripped-- ($STAGING_SERVER)
deployment: staging
script:
- pipe: atlassian/sftp-deploy:0.5.7
variables:
SERVER: $STAGING_SERVER
USER: $STAGING_USER
PASSWORD: $STAGING_PASSWORD
REMOTE_PATH: "/httpdocs/--stripped--/"
LOCAL_PATH: "build/*"
EXTRA_ARGS: "-r -P 2121"
DEBUG: "true"
The .htaccess file is present in the artifacts tar.gz file downloaded from the pipe after completing the first step. But it doesn't get transferred in the second step.
I also tried different approaches (globs) on the LOCAL_PATH variable, including single and double asterisks. I also passed the -r flag in EXTRA_ARGS… but it doesn't work.
Does anybody know a solid solution to this?
Greetings & a happy new year!
Ralph
@Ralph Bolliger Thanks for using the pipe.
Following basic steps , I didn't succeed to reproduce your issue.
I have deployed through sftp-deploy pipe folder with hidden files and tried to run yarn build - it says there is no such command.
Perhaps, you meant `yarn install` or some plugins should be installed?
Also, I'd like to get the problem more precisely: are you looking for .htaccess file in tar.gz and then you look for .htaccess file or .tar.gz file on the server?
Svftp-deploy pipe only deploys files to server without unpacking.
Regards, Galyna
Hi Galyna
Hmm. I've to try this again with the next deployment. But:
The whole pipeline works fine but the .htaccess file on artifact root doesn't get tranferred even it's present in the artifact from step named »Create staging build«.
Would it be helpful to paste the log output from the pipline after next run here?
Greetings
Ralph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ralph Bolligeryes, sure , the logmay always be helpful.
I will try to reproduce this again.
Perhaps, I have missed something. For example, I have just noticed, you use unusual name of remote dir `--stripped--`.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Galyna, the directory is actually not called --stripped--. I replaced the name with --stripped-- in order not to make names public here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ralph BolligerI managed to reproduce your problem and fix it.
So, try not build/* , but build/ in the variable LOCAL_PATH , with same EXTRA_ARGS.
The thing is build/* gives you all not hidden files
Regards, Galyna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Galyna, thank you for coming back to me.
I changed the pipeline configuration and managed to transfer the hidden files (.htaccess) to the remote server.
Unfortunately the change from build/* to build/ creates a directory called build/ on remote root. But I simply changed the web server configuration in order to serve the application from the new build/ directory.
This works for now.
Greetings, Ralph
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also have this issue but won't accept that the files are transferred to an additional directory.
How to transfer files, including hidden files, from dist?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.