Commit Graph

50 Commits

Author SHA1 Message Date
Michael Hobbs
de9b1f6273 [ci skip] make help desc local consistent 2016-03-22 13:33:35 -07:00
Justin Clark
14a1d06c03 Collapse help into expandable command topics 2016-03-22 10:50:20 -07:00
Michael Hobbs
987c5cfb9c use declare for description variable 2016-03-08 15:30:34 -05:00
Michael Hobbs
aa2415eeb8 more style/function tweaks 2016-03-03 22:11:35 -08:00
Michael S. Hobbs
89f289b433 subcommand restructure and bashstyle refactor. closes #1579 2016-03-03 22:11:35 -08:00
Michael Hobbs
d1b87bd7b7 cleanup shellcheck SC2086 2016-02-23 07:50:06 -08:00
Michael Hobbs
17e7869150 label all dokku containers 2016-01-05 11:55:07 -08:00
Jose Diaz-Gonzalez
7562610c7d Fix output of dokku apps 2016-01-04 17:07:43 -05:00
Jose Diaz-Gonzalez
244bb25e6a Fix variable reference 2016-01-04 05:20:05 -05:00
Jose Diaz-Gonzalez
2a94bf267b Fix pre-receive git-hook
Closes #1817
2016-01-04 04:40:05 -05:00
Jose Diaz-Gonzalez
51a50fb571 Use dokku_apps for listing apps instead of re-inventing the wheel 2016-01-02 02:31:34 -05:00
Michael Hobbs
803ef7d9f3 ensure app name begins with lowercase. closes #1774 2015-12-22 12:02:18 -08:00
Zach Feldman
f0b260d7dc Adds dokku apps:rename function, closes #1440.
Adds unit test for new apps:rename function.

Add example in the docs for new apps:rename function.

Add apps:rename command to help command.

Delete cache directory before copying old app directory to new app directory.

deploy_app instead of create_app for apps:rename testing.

Change app url to match new name. Fix unit tests.

Add some more tests, plugn triggers.
2015-11-30 16:27:10 -05:00
Jose Diaz-Gonzalez
8e9d04ae36 Add post-create hook
Note that this is invoked *before* the application is deployed, so it's usage is quite different than a potential post-successful-create hook.
2015-11-26 15:47:59 -05:00
Dan Callahan
c389b213b5 Resolve SC2162: 'read without -r mangles backslashes'
More information:

https://github.com/koalaman/shellcheck/wiki/SC2162

http://wiki.bash-hackers.org/commands/builtin/read
2015-11-04 20:40:42 -06:00
Dan Callahan
8ed0193b1d Resolve SC2115: 'Use "${var:?}" to ensure this never expands to /'
https://github.com/koalaman/shellcheck/wiki/SC2115
2015-11-03 22:00:05 -06:00
Jose Diaz-Gonzalez
70511c340d Check if command is implemented in a plugin before executing plugin code
Because of how plugin commands are implemented, their output can be incredibly verbose. Rather than executing even the `set -eo pipefail` parts of a plugin, we immediately check if the command is implemented by a plugin. If it is not, then we continue on as normal.

One side-effect of this change is that plugin commands need to be duplicated again:

- once in the command array
- once for the actual body of the command
- once in the help output

This is also quite hackish, and probably not the best way to decrease trace output. Note that we drop approximately 2k lines worth of logs with this change.
2015-09-18 16:09:59 -04:00
Jose Diaz-Gonzalez
27a2478a33 Follow bashstyle where possible 2015-09-16 16:06:31 -07:00
Michael Hobbs
8095df79f6 implement core plugin mgmt using plugn. add tests. 2015-09-15 02:17:28 -07:00
Jose Diaz-Gonzalez
ad72a137e1 Fix sourcing of functions 2015-09-15 02:16:40 -07:00
Michael Hobbs
6d70751cfc force removal of app directory on post-delete 2015-09-15 02:16:40 -07:00
Michael Hobbs
7a545759f2 initial pass at switching to plugn 2015-09-15 02:16:40 -07:00
Jose Diaz-Gonzalez
adfc3a8101 Use dokku_log_fail in favor of dokku_log_warn
If a command will exit because of invalid input, that isn't a warning, it's a failure.
2015-09-04 00:18:41 -04:00
Jose Diaz-Gonzalez
95161a2a9f Use dokku_log_fail in all cases where there is an exit 1 2015-09-04 00:17:45 -04:00
Michael Hobbs
9c37069a6a create get_app_image_repo() to define our app image pattern and use it 2015-09-03 17:21:22 -07:00
Michael Hobbs
433db65635 use PLUGIN_PATH 2015-09-03 16:52:35 -07:00
Michael Hobbs
495b1d2ba0 refactor to explicitly set IMAGE via get_app_image_name() 2015-09-03 16:12:36 -07:00
Michael Hobbs
04a4da7fc5 allow tagging and deployment of tagged app images 2015-09-02 11:18:01 -07:00
Jim Myhrberg
d5df6a4190 Use $PLUGIN_PATH instead of $(dirname $0)/..
As briefly discussed in #1425, source the `common/functions` file via an
absolute path, rather than determining the relative path by using
`dirname`. 3rd-party plugins should follow suit and use the new
`$PLUGIN_PATH` convention too.
2015-08-28 14:14:28 +01:00
Michael Hobbs
b30db17def use column to format help output 2015-07-28 09:31:56 -07:00
Michael Hobbs
c7cb014580 convenience functions for app container state 2015-07-13 09:27:42 -07:00
Michael Hobbs
a84397895a initial pass at config plugin arguments refactor 2015-07-06 19:41:17 -07:00
Michael Hobbs
e27d0e6fa5 wrap container id checks and reading into common function that attempts new and old style container id files
aggregate log streams
2015-04-21 14:32:30 -07:00
Michael Hobbs
9164740117 rename log functions with dokku_log_ prefix 2015-02-06 08:28:14 -08:00
Michael Hobbs
371ba99540 include echo functions that don't print when quiet arg is passed 2015-02-05 12:38:59 -08:00
Michael Hobbs
6ad65dd9b4 first stab at a common functions library. include argument parsing and a few definitions wired up. closes #932. closes #945 2015-02-05 11:32:46 -08:00
Michael Hobbs
55c2b0fd62 allow force override 2015-01-16 14:57:49 -08:00
Michael Hobbs
9d81dda524 try circle again 2015-01-05 17:03:06 -08:00
Michael Hobbs
c2736c7c7a auto remove the cache dir cleanup container 2014-12-20 17:20:32 -08:00
Michael Merickel
4ae8cf8180 fix search for apps if DOKKU_ROOT is a symlink 2014-11-25 11:56:05 -06:00
Michael Merickel
aef3a68d2b fix app plugin that was always searching for empty app name 2014-11-25 11:55:25 -06:00
Jose Diaz-Gonzalez
04dbe31919 Unify the way in which all error messages are specified
Other parts of dokku use one-liners where possible, so these parts should as well
2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
a3b3a6a12a Unify missing app error messages 2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
d307a5b8ec Output error message when a command is not found. Closes #778
Plugins with commands will need to implement a catch-all command that exits with the `DOKKU_NOT_IMPLEMENTED_EXIT`` code (10). This signals to dokku that a given plugin has indeed not executed anything for a plugin (which may not always be the case).

Using plugins that do not implement this pattern will result in those plugins silencing the error message.
2014-11-23 18:09:11 -05:00
Jose Diaz-Gonzalez
cfc7c41e47 Add PLUGIN:help command to each plugin 2014-11-22 17:52:46 -05:00
Jose Diaz-Gonzalez
bf4876107d Sort output of apps command 2014-11-16 19:14:51 -05:00
Jose Diaz-Gonzalez
d36249f51a Ignore tls directory when listing out apps 2014-11-16 13:08:00 -05:00
Jose Diaz-Gonzalez
b68a8da2ce Do not allow users to delete the tls directory 2014-11-16 13:00:07 -05:00
Jose Diaz-Gonzalez
7b361e564f Use 2 spaces for formatting bash
Also remove extra trailing newlines
2014-11-16 02:58:52 -05:00
Jose Diaz-Gonzalez
4b9433052f Create an apps core plugin.
This creates the following commands:

- apps
- apps:create <app>
- apps:destroy <app>

It also:

- makes `delete` an alias for `apps:destroy`
- adds confirmation to `apps:destroy`
- allows a developer to remove apps that have been created via apps:create but have not been deployed

Refs #87
Refs #543
Refs #586
Closes #599
Refs #655
Refs #656
Refs #685
Closes #757
2014-11-16 02:30:39 -05:00