dokku_test_deploy/.drone.yml

31 lines
764 B
YAML
Raw Normal View History

2023-02-21 00:30:26 +00:00
kind: pipeline
type: docker
2023-02-21 00:37:16 +00:00
name: deploy
2023-02-21 00:30:26 +00:00
steps:
2023-02-21 00:37:16 +00:00
- name: deploy
image: dokku/ci-docker-image
pull: always
environment:
DOKKU_HOST: apps1.fnukinternal.net
DOKKU_APP_NAME: dokku-ci-deploy
DOKKU_USERNAME: dokku
SSH_PRIVATE_KEY:
from_secret: dokku_ssh_key
JUMP_HOST: 192.168.0.24
JUMP_USER: jumpuser
JUMP_PRIVATE_KEY:
from_secret: dokku_ssh_key
commands:
- mkdir -p ~/.ssh
- echo "$JUMP_PRIVATE_KEY" > ~/.ssh/id_rsa_jump
- chmod 600 ~/.ssh/id_rsa_jump
- echo "Host dokku.example.com" > ~/.ssh/config
- echo " ProxyCommand ssh -W %h:%p $JUMP_USER@$JUMP_HOST -i ~/.ssh/id_rsa_jump" >> ~/.ssh/config
- dokku apps:create $DOKKU_APP_NAME
- dokku git:sync --force $DOKKU_APP_NAME
2023-02-21 00:30:26 +00:00
trigger:
branch:
- main