create app if not exists
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Dovi Cowan 2023-02-21 02:36:15 +00:00
parent b540c6696b
commit 8be9ac5ab3
Signed by: dcowan
GPG key ID: C110D77558FBC227

View file

@ -48,8 +48,16 @@ steps:
path: /root/.ssh path: /root/.ssh
commands: commands:
- git remote add dokku dokku:$DOKKU_APP_NAME - git remote add dokku dokku:$DOKKU_APP_NAME
- ssh jump "echo 'Hello world'" - ssh jump "echo 'Host key added'"
- ssh dokku "echo 'Hello world'" - ssh dokku "echo 'Host key added'"
- name: create-app
image: ubuntu
volumes:
- name: ssh
path: /root/.ssh
commands:
- ssh dokku apps:exists $DOKKU_APP_NAME
- if [ $? -eq 0 ]; then ssh dokku apps:create $DOKKU_APP_NAME; else echo "App already exists"; fi
- name: push-to-dokku - name: push-to-dokku
image: bitnami/git:2.39.2 image: bitnami/git:2.39.2
volumes: volumes: