feat: add support for checking if an application exists

This is useful for creating review applications in CI/CD pipelines.
This commit is contained in:
Jose Diaz-Gonzalez
2018-02-28 02:27:29 -05:00
parent 86a0ae1dde
commit 399073f77b
4 changed files with 54 additions and 0 deletions

View File

@@ -6,6 +6,7 @@
apps:clone <old-app> <new-app> # Clones an app
apps:create <app> # Create a new app
apps:destroy <app> # Permanently destroy an app
apps:exists <app> # Checks if an app exists
apps:list # List your apps
apps:rename <old-app> <new-app> # Rename an app
apps:report [<app>] [<flag>] # Display report about an app
@@ -40,6 +41,20 @@ node-js-app
python-app
```
### Checking if an application exists
For CI/CD pipelines, it may be useful to see if an application exists before creating a "review" application for a specific branch. You can do so via the `apps:exists` command:
```shell
dokku apps:exists node-js-app
```
```
App does not exist
```
The `apps:exists` command will return non-zero if the application does not exist, and zero if it does.
### Manually creating an application
A common pattern for deploying applications to Dokku is to configure an application before deploying it. You can do so via the `apps:create` command: