Commit Graph

52 Commits

Author SHA1 Message Date
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
Justin Clark
86b4987588 Depreciate and remove dokku backup plugin, replace with documentation 2016-03-02 15:56:33 -08:00
Michael Hobbs
d1b87bd7b7 cleanup shellcheck SC2086 2016-02-23 07:50:06 -08:00
Jose Diaz-Gonzalez
29ce25a040 Allow updating submodules at any revision
Using `--depth=1` breaks any submodules that are not at HEAD
2015-12-30 00:13:05 -05:00
Michael Merickel
d31ac73066 avoid copying the entire git repo to a tmp folder when building the app
It's not possible to checkout a specific commit into a new repository
using ``git fetch`` and so a temporary tag is added to the host
repository, then fetched.
2015-12-16 16:08:56 -06: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
Jose Diaz-Gonzalez
49a07e5210 Merge pull request #1664 from progrium/mh-add-rev-to-pre-receive-app
add $REV to pre-receive-app call
2015-11-05 21:59:25 -05:00
Michael Hobbs
455033703a add $REV to pre-receive-app call 2015-11-05 17:18:44 -08: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
Jose Diaz-Gonzalez
7d31c4fc1e Add pre-receive-app plugin trigger
Users can modify the temporary working directory to add or remove any necessary files before an application is processed for deployment.
2015-10-24 00:11:29 -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
Michael Hobbs
30631692a5 cat is no longer needed by plugn 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
7a545759f2 initial pass at switching to plugn 2015-09-15 02:16:40 -07:00
Jose Diaz-Gonzalez
4e0fed18a6 Merge pull request #1421 from basicer/tar-plugin
First pass at tar plugin.
2015-08-31 12:52:35 -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
Rob Blanckaert
712e1cada7 - Fixed shellcheck error
- Made test pass
2015-08-26 02:37:52 -04:00
Michael Hobbs
6d71c164f0 Merge pull request #1128 from progrium/1091_mh-switch-to-herokuish
switching to herokuish. closes #1091
2015-08-24 12:11:05 -07:00
Rob Blanckaert
98990b6885 Make dokku play nice when we have multiple receive-app hooks in various plugins. 2015-08-24 14:20:36 -04:00
Michael Hobbs
0840d8fd1f initial pass at switching to herokuish. closes #1091 2015-07-06 12:41:54 -07:00
Maciej Łebkowski
259f8507ca pluginhook to receive branches different than master 2015-06-25 18:00:11 +02:00
Andreas Litt
5968e81b17 exec git-receive-pack with correct path 2015-04-23 15:17:25 +02:00
Andreas Litt
3aa5231f7e remove leading '/' from APP-Name. 2015-04-23 15:04:42 +02:00
Michael Hobbs
7357df7c9d first pass at dockerfile support 2015-02-07 17:56:01 -08:00
Michael Hobbs
c96d139f54 use flock when (re)building/deploying 2015-01-28 16:18:57 -08:00
Michael Hobbs
9f985077c7 implement rebuild command that reuses git_archive_all 2015-01-27 15:00:00 -08:00
Michael Hobbs
3706392e65 test with wercker 2014-12-21 14:51:40 -08:00
Jose Diaz-Gonzalez
4fa567dbe3 Merge pull request #780 from progrium/778-better-error-message
Output error message when a command is not found. Closes #778
2014-11-23 21:05:08 -05:00
Jose Diaz-Gonzalez
463f725872 Use git-* as a pluginhook prefix 2014-11-23 21:02:40 -05:00
Jose Diaz-Gonzalez
aa1c7f6fa4 Move git-upload-pack command to git plugin
Also use the same APP escaping as used for other git commands.
2014-11-23 20:47:15 -05:00
Will Boyce
ad497191df Add git pull support 2014-11-23 20:39:57 -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
7b361e564f Use 2 spaces for formatting bash
Also remove extra trailing newlines
2014-11-16 02:58:52 -05:00
Jose Diaz-Gonzalez
f13c1031c7 Ensure there is a newline after calling set -e 2014-11-16 02:54:54 -05:00
Tom Bell
42c9d7aaa6 Actually suppress the output from the git commands 2014-09-30 21:08:23 +01:00
aegypius
d208e53649 Suppress git advice related to detached HEAD 2014-01-07 14:30:29 +01:00
Jazz
7f0591fa1e Submodules support 2013-12-28 16:10:13 +01:00
Michael Huynh
d9ed1e07eb Fix edge case: app directory is created before first app push
When an app directory (i.e. `/home/dokku/myapp`) is created before the
app is pushed for the first time (which may occur if config files such
as `ENV` are added before the initial push), then the app directory will
not be initialized to a bare git repo nor will the pre-receive hook be
installed because `plugins/git/commands` assumes that if `$APP_PATH`
exists, then the directory must also be git initialized too. This fix
checks for `$APP_PATH/refs` instead.
2013-12-23 21:50:49 -05:00
jay becker
7eae3b063c notify user when pushing to non-master branch 2013-12-22 14:30:51 -06:00
Paul Lietar
455be29249 Fix commands, the easy way.
Don't use pluginhook to run the commands hook, just run all the scripts
in a loop.
2013-11-22 21:42:39 +00:00
rhy-jot
6d64edc16a Update headers 2013-11-19 21:15:29 -08:00
rhy-jot
dae4e55f25 Merge pull request #265 from asm89/backup
Introduce `backup` plugin to export/import settings
2013-11-19 21:07:20 -08:00
Paul Lietar
83ce81fc51 Enable tracing in hooks when DOKKU_TRACE is set.
This makes it much easier to debug plugins.
Also source the 'dokkurc' file when starting dokku. This makes it easy
to define DOKKU_TRACE over ssh.
2013-11-18 20:59:48 +00:00
Alexander
2219044114 Introduce DOKKU_ROOT and import now in git plugin 2013-11-14 23:51:35 +01:00
Jeff Lindsay
df7507d1be normalizing shebang and bash options. also added long-term fix for bootstrap instructions 2013-10-29 17:13:02 -05:00
Paul Lietar
bca5a99b1d Don't allow the push if building failed. 2013-10-28 21:15:17 +00:00
Paul Lietar
b5c8dd7436 Use DOKKU_ROOT instead of HOME.
HOME is not consistent if dokku is ran e.g. as root (for setup).
The DOKKU_ROOT variable will also make it possible to have the repositories stored in an arbitrary location (works-ish right now)
2013-10-28 21:15:17 +00:00