Commit Graph

78 Commits

Author SHA1 Message Date
Michael Hobbs
b49cceefd7 don't use exit 0 in config functions 2015-09-28 17:44:10 -07:00
Michael Hobbs
fd44635e74 Merge remote-tracking branch 'origin/reduce-trace-output' into 1123_mh-nginx-novhost 2015-09-18 17:34:32 -07:00
Michael Hobbs
3e18d9aff9 create functions for app/global vhost detection. make VHOST setting more explicit 2015-09-18 16:48:18 -07: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
Arthur Schreiber
b6c4a750de Support removing config variables that contain \n. 2015-09-18 15:32:33 +02:00
Jose Diaz-Gonzalez
27a2478a33 Follow bashstyle where possible 2015-09-16 16:06:31 -07:00
Jose Diaz-Gonzalez
c929edfbe5 Source plugins from $PLUGIN_AVAILABLE_PATH when not using common plugin
This will allow us to override any core plugin
2015-09-15 02:22:08 -07:00
Michael Hobbs
8095df79f6 implement core plugin mgmt using plugn. add tests. 2015-09-15 02:17:28 -07:00
Jose Diaz-Gonzalez
b3ddcbed53 Remove deprecated calls 2015-09-15 02:17:27 -07:00
Jose Diaz-Gonzalez
ad72a137e1 Fix sourcing of functions 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
95161a2a9f Use dokku_log_fail in all cases where there is an exit 1 2015-09-04 00:17:45 -04: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
Jose Diaz-Gonzalez
7db481fe36 move last actions into functions 2015-09-01 14:30:32 -04:00
Jose Diaz-Gonzalez
7b5ea80ea4 Move get and set actions into functions 2015-09-01 00:52:40 -04:00
Jose Diaz-Gonzalez
b01d371c46 Move all functions into config/functions 2015-08-31 23:08:28 -04:00
Jose Diaz-Gonzalez
59a80f7857 Move config_create into config/functions 2015-08-31 23:06:45 -04:00
Jose Diaz-Gonzalez
c32bf8f035 pass in ENV_FILE to config_create 2015-08-31 23:05:47 -04:00
Jose Diaz-Gonzalez
99f1f1b6d3 Move config arg parsing into config/functions 2015-08-31 23:03:52 -04:00
Jose Diaz-Gonzalez
e7c035e207 Use config_export function instead of calling dokku as a subcommand 2015-08-30 01:55:14 -04:00
Jose Diaz-Gonzalez
cc66905c6e Use dokku config to export config for dockerfile builds 2015-08-30 01:23:56 -04:00
Jose Diaz-Gonzalez
60c0f56724 Fix lint errors 2015-08-30 01:23:56 -04:00
Jose Diaz-Gonzalez
6566be04e5 Do not exit 1 when there is no env file and the --export flag is in use 2015-08-30 01:23:56 -04:00
Jose Diaz-Gonzalez
c2626bf934 Add --export flag for producing export-compatible config output 2015-08-30 01:23:56 -04: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
d21caa4811 Merge branch 'master' into 1091_mh-switch-to-herokuish 2015-07-28 10:55:44 -07:00
Michael Hobbs
b30db17def use column to format help output 2015-07-28 09:31:56 -07:00
Michael Hobbs
710c6f4e88 don't run dokku again on --* args in config plugin 2015-07-07 12:31:57 -07:00
Michael Hobbs
a84397895a initial pass at config plugin arguments refactor 2015-07-06 19:41:17 -07:00
Michael Hobbs
0840d8fd1f initial pass at switching to herokuish. closes #1091 2015-07-06 12:41:54 -07:00
Arthur Schreiber
0da389e8af Further fixes for config values containing newlines. 2015-06-23 23:53:10 +02:00
Arthur Schreiber
182ae4a50a Support config variables containing \n 2015-06-23 23:41:34 +02:00
Michael Hobbs
6cb770bf1c create config set/unset without restart. closes #908 2015-03-17 09:49:19 -07:00
Michael Hobbs
fb8f08d280 remove quoting from dockerfile env. closes #1002 2015-02-24 11:56:54 -08:00
Michael Hobbs
7357df7c9d first pass at dockerfile support 2015-02-07 17:56:01 -08: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
61e154899b use ps:restart for config and domains plugins 2015-01-14 15:25:53 -08:00
Michael Hobbs
3706392e65 test with wercker 2014-12-21 14:51:40 -08:00
Michael Merickel
ee5c35dd9d do not output message when creating ENV file
This fixes a bug introduced when deploying apps where the
nginx-vhosts plugin runs ``dokku config:get $APP NO_VHOST``. The initial
run of this actually was creating the ``ENV`` file and dumping to
stdout the value "NO_VHOST=-----> Creating /home/dokku/foo/ENV". This
was obviously no good because nginx-vhosts was considering this to be a
value of true.

I've modified this to simply not return anything when the value does not
exist. A better update may be to output the messages to stderr instead
of stdout.
2014-11-25 15:43:36 -05:00
Jose Diaz-Gonzalez
407436b4cc Exit 0 if there is no configuration
heroku config:get exits 0 in this case
2014-11-23 23:32:42 -05: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
303bd77226 Simplify if statement 2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
c6e39c08f0 Simplify env var checking in config plugin
All checks are now done within the commands, and we only need to ensure the config file exists.
2014-11-23 23:32:42 -05:00
Jose Diaz-Gonzalez
12194e2cc8 Add proper error handling to each config command 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
8bc3d372ec Minor bash formatting changes 2014-11-23 16:42:21 -05:00