Problem: i am using atlassian/sftp-deploy to deploy my final master push to live server . i don't know what is worng but its deploying my files under build folder on my remote server: REMOTE_PATH: '/var/www/html/'LOCAL_PATH: $(pwd) (not sure even its right )
Hi Sunny,
`$(pwd)` is resolving to `<span>/opt/atlassian/pipelines/agent/build` so sftp is taking that path and copying everything to your remote, i.e. /opt/atlassian/pipelines/agent/build/wibble gets copied to /var/www/html/build/wibble. If you change `$(pwd)` to `.` I'm guessing it will then copy ./wibble to /var/www/html/./wibble, which is actually just /var/www/html/wibble, which should be what you want.</span>
<span>/opt/atlassian/pipelines/agent/build` so sftp is taking that path and copying everything to your remote, i.e. /opt/atlassian/pipelines/agent/build/wibble gets copied to /var/www/html/build/wibble. If you change `$(pwd)` to `.` I'm guessing it will then copy ./wibble to /var/www/html/./wibble, which is actually just /var/www/html/wibble, which should be what you want.</span>
<span>Hope this helps,</span>
<span>Matt</span>
HI @mwatson thanks for answer. Somehow it work with /opt/atlassian/pipelines/agent/build* by putting '*' in front. but Now the problem is its uploading full source code. I want to upload only newly pushed code to be upload to the deployment . I don't know if its even possible . currently i am creating zip [which contain all the code. that's issue. and uploading to live server here is my current yml file.pipelines:branches: # Automated triggers on commits to branchesmaster: # -- When committing to master branch- step:name: Deploy to productiondeployment: productionscript:- apt-get update # required to install zip- apt-get install -y zip # required for packaging up the application# - zip -r /tmp/hutchh.zip *- zip -r /opt/atlassian/pipelines/agent/build/hutchh.zip '/opt/atlassian/pipelines/agent/build/'- pipe: atlassian/sftp-deploy:0.3.1variables:USER: 'webuser'SERVER: '54.66.217.82'REMOTE_PATH: '/var/www/html/'LOCAL_PATH: '/opt/atlassian/pipelines/agent/build/hutchh.zip'I want to zip and upload only files that are commit or pushed to master branch. not all source which currently happening thanks
It looks like you're new here. Sign in or register to get started.