You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
544 B
27 lines
544 B
#!/usr/bin/env bash
|
|
|
|
mkdir /root/.ssh
|
|
echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
|
|
chmod 0600 /root/.ssh/*
|
|
chmod 700 /root/.ssh
|
|
|
|
case "$DRONE_BRANCH" in
|
|
"dev")
|
|
USER=maxime
|
|
IP=92.132.18.192
|
|
DIR=server/TBasket
|
|
;;
|
|
"production")
|
|
USER=palafour
|
|
IP=193.49.118.205
|
|
DIR=public_html/TBasket
|
|
;;
|
|
"")
|
|
echo "DRONE_BRANCH is missing" >&2
|
|
exit 1
|
|
;;
|
|
*)
|
|
echo "branch $1 is unable to perform delivery, authorized branches are 'dev and production' for delivery." >&2
|
|
echo "delivery step skipped"
|
|
exit 0
|
|
esac |