Created
September 19, 2017 15:43
-
-
Save snewell92/65ee8d9371fa233210061de4dc62284d to your computer and use it in GitHub Desktop.
circle ci ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: kyleondy/alpine-rsync | |
working_directory: ~/repo | |
steps: | |
- run: | |
name: list | |
command: ls -la ~/.ssh | |
- run: | |
name: placeholder | |
command: echo 'No work to do or automated tests to run (yet). Build and test pass.' | |
deployment: | |
docker: | |
- image: snew92/dorian-asp-rsync-deploy:0.2 | |
working_directory: ~/repo | |
steps: | |
- checkout | |
- run: | |
name: deploy | |
command: sh ~/repo/repo-scripts/deploy.sh | |
workflows: | |
version: 2 | |
build-and-deploy: | |
jobs: | |
- build | |
- deployment: | |
filters: | |
branches: | |
only: | |
- master | |
requires: | |
- build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
eval $(ssh-agent -s) | |
# What would I pass to ssh-add?? | |
# ssh-add | |
rsync -avzqr -e "ssh -p xx -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \ | |
~/repo/ some-user@host1.com:/path/to/remote/dir/ \ | |
& \ | |
rsync -avzqr -e "ssh -p xx -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \ | |
~/repo/ some-user@host2.com:/path/to/remote/dir/ \ | |
& \ | |
rsync -avzqr -e "ssh -p xx -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \ | |
~/repo/ some-user@host3.com:/path/to/remote/dir/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment