Skip to content

Instantly share code, notes, and snippets.

@anilnautiyal
Created January 14, 2020 04:51
Show Gist options
  • Save anilnautiyal/de99defa1288d6539f9a1a6f6401b910 to your computer and use it in GitHub Desktop.
Save anilnautiyal/de99defa1288d6539f9a1a6f6401b910 to your computer and use it in GitHub Desktop.
image: ubuntu:latest
pipelines:
branches:
master:
- step:
script:
- apt-get update -yqq
- 'which ssh-agent || ( apt-get install openssh-client -yqq )'
- 'which rsync || ( apt-get install rsync -yqq )'
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- mkdir -p $HOME/.ssh
- eval $(ssh-agent -s)
- rsync -zrSlh -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --stats $BITBUCKET_CLONE_DIR/ $APP_USER@$APP_SERVER:$APP_REMOTE_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment