My bitbucket-pipelines.yml file looks like this https://pastebin.com/MX5bXiuB
As one can see, in my bitbucket-pipelines.yml I use some Deployment variables, such as $SSH_USER, $SSH_HOST etc.
And my question is about that test-deploy.sh that I use to run some commands on my remote server during deploy process. I'd like to use that (or some other) pipelines Deployment variables (like $DEPLOY_DIR etc.) inside my test-deploy.sh so i could rule them all in one place. When I try
cd $DEPLOY_DIR
inside my test-deploy.sh it does not work. Neither work
- cat ./_ci/test-deploy.sh $DEPLOY_DIR | ssh -T $SSH_USER@$SSH_HOST
followed by
cd $1
Any ideas of how this could be done are appreciated.