add volumes to share ssh between steps
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
7c0b5411b4
commit
9ca3b2daea
1 changed files with 18 additions and 5 deletions
23
.drone.yml
23
.drone.yml
|
@ -6,7 +6,8 @@ platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
image: bitnami/git:2.39.2
|
pool:
|
||||||
|
use: ubuntu:latest
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
BRANCH: main
|
BRANCH: main
|
||||||
|
@ -19,11 +20,15 @@ environment:
|
||||||
steps:
|
steps:
|
||||||
- name: configure-environment
|
- name: configure-environment
|
||||||
pull: always
|
pull: always
|
||||||
|
image: bitnami/git:2.39.2
|
||||||
|
volumes:
|
||||||
|
- name: ssh
|
||||||
|
path: ~/.ssh
|
||||||
environment:
|
environment:
|
||||||
SSH_PRIVATE_KEY:
|
SSH_PRIVATE_KEY:
|
||||||
from_secret: dokku_ssh_key
|
from_secret: dokku_ssh_key
|
||||||
JUMP_PRIVATE_KEY:
|
JUMP_PRIVATE_KEY:
|
||||||
from_secret: dokku_ssh_key
|
from_secret: dokku_ssh_key
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- echo -e "Host jump\n Hostname $JUMP_HOST\n User $JUMP_USER\n IdentityFile ~/.ssh/id_rsa\n StrictHostKeyChecking no" > ~/.ssh/config
|
- echo -e "Host jump\n Hostname $JUMP_HOST\n User $JUMP_USER\n IdentityFile ~/.ssh/id_rsa\n StrictHostKeyChecking no" > ~/.ssh/config
|
||||||
|
@ -37,9 +42,17 @@ steps:
|
||||||
- chmod 600 ~/.ssh/id_rsa
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
- apt-get update && apt-get install git -y
|
- apt-get update && apt-get install git -y
|
||||||
- name: add-remote
|
- name: add-remote
|
||||||
|
image: bitnami/git:2.39.2
|
||||||
|
volumes:
|
||||||
|
- name: ssh
|
||||||
|
path: ~/.ssh
|
||||||
commands:
|
commands:
|
||||||
- git remote add dokku dokku:$DOKKU_APP_NAME
|
- git remote add dokku dokku:$DOKKU_APP_NAME
|
||||||
- name: push-to-dokku
|
- name: push-to-dokku
|
||||||
|
image: bitnami/git:2.39.2
|
||||||
|
volumes:
|
||||||
|
- name: ssh
|
||||||
|
path: ~/.ssh
|
||||||
commands:
|
commands:
|
||||||
- git push dokku $BRANCH
|
- git push dokku $BRANCH
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue