|
@ -26,7 +26,7 @@ steps: |
|
|
- name: deploy |
|
|
- name: deploy |
|
|
image: ubuntu:20.04 |
|
|
image: ubuntu:20.04 |
|
|
environment: |
|
|
environment: |
|
|
SSH_PRIVATE_KEY: |
|
|
|
|
|
|
|
|
SSH_DRONE_PRIVATE_KEY: |
|
|
from_secret: ssh_private_key |
|
|
from_secret: ssh_private_key |
|
|
SSH_USERNAME: |
|
|
SSH_USERNAME: |
|
|
from_secret: ssh_username |
|
|
from_secret: ssh_username |
|
@ -36,6 +36,6 @@ steps: |
|
|
- apt-get update |
|
|
- apt-get update |
|
|
- apt-get -y install openssh-client |
|
|
- apt-get -y install openssh-client |
|
|
- eval `ssh-agent -s` |
|
|
- eval `ssh-agent -s` |
|
|
- echo -n $SSH_PRIVATE_KEY | wc -l |
|
|
|
|
|
- echo -n $SSH_PRIVATE_KEY | ssh-add - |
|
|
|
|
|
|
|
|
- wc -l <(echo "$SSH_PRIVATE_KEY") |
|
|
|
|
|
- ssh-add <(echo "$SSH_PRIVATE_KEY") |
|
|
- ssh $SSH_USERNAME@$SSH_TARGET ./deploy-ykonsole.sh $DRONE_BUILD_NUMBER |
|
|
- ssh $SSH_USERNAME@$SSH_TARGET ./deploy-ykonsole.sh $DRONE_BUILD_NUMBER |