Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Rsync deploy for multiple servers

Paweł Sobociński October 12, 2021

Hello,
is it possible to deploy via rsync (atlassian / rsync-deploy) and execute the ssh command (atlassian / ssh-run) to multiple servers simultaneously?

for example:

script:
- pipe: atlassian/rsync-deploy:0.6.0
variables:
USER: $USER_PRE_PROD
SERVER: ['IP_1', 'IP_2', 'IP_3']
REMOTE_PATH: $REMOTE_PATH
LOCAL_PATH: 'app'

when I run it like this I have such an error: /pipe.sh: line 27: SERVER: SSH_SERVER variable missing

env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/rsync-deploy" \
--env=REMOTE_PATH="$REMOTE_PATH" \
--env=SERVER_0="IP_1" \
--env=SERVER_1="IP_2" \
--env=SERVER_2="IP_3" \
--env=SERVER_COUNT="3" \
--env=USER="$USER_PRE_PROD" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \

...

Status: Downloaded newer image for bitbucketpipelines/rsync-deploy:0.6.0
/pipe.sh: line 27: SERVER: SSH_SERVER variable missing.

INFO: Executing the pipe...

 

1 answer

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 15, 2021

Hi @Paweł Sobociński . Thanks for your question. This feature is not supported, but you can use parallel steps where each script relates to each of your server. Example: Parallel steps 

Regards, Igor

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events