Commit graph

388 commits

Author SHA1 Message Date
Alexander Miehe 70c4823581 Add config option to set ConnectTimeout for ssh connections 2015-01-09 14:05:37 +01:00
Jérémy Huet 5643616e50 Only tries to guess web server user if none provided with 'group' parameter 2014-12-28 16:47:59 +01:00
Dmitry Motylev 3b70a8a3c1 fix: DeployCommand does not fail when no one "Post-Deployment Tasks" failed and failed "Deployment Task" exist 2014-12-23 17:34:48 +00:00
Jérémy Huet fbc50a52bd Adds a task to only have read permission for web server 2014-12-18 17:46:13 +01:00
Jérémy Huet 42d3d5a8a1 Better usage doc + allow to set owner and group by using www-data:www-data syntax + task now fails if at least one command returns error 2014-12-18 17:45:12 +01:00
Jérémy Huet 209c6b9aa3 typo 2014-12-15 18:50:27 +01:00
Jérémy Huet ffdadb45cf More generic way to handle command line options 2014-12-15 18:50:09 +01:00
Jérémy Huet 979a86992c More generic way to retrieve web server user 2014-12-13 16:44:47 +01:00
Jérémy Huet e449a4529f Adds a recursive parameter and allows for more chmod possibilities such as +a 2014-12-13 16:22:56 +01:00
Jérémy Huet 89d82b9992 Changing EOL to Linux LF 2014-12-13 16:05:13 +01:00
Jérémy Huet 9d1e6aba6f Allow for changing permissions on local host too depending on the stage 2014-12-13 15:57:33 +01:00
Jérémy Huet a58dcbe766 git local commands should be executed in the deployment:from directory 2014-12-13 15:14:43 +01:00
Jérémy Huet 8247b15ad0 Adds PermissionsWritableByApache task that extends Permissions task we predefined parameters 2014-12-13 13:59:57 +01:00
Jérémy Huet d2b7e0e94f Adds Permissions task. Parameters are : paths, checkPathsExist, owner, group, rights 2014-12-13 13:58:06 +01:00
Андрей Колченко 2a8beeb864 Remove symfony/filesystem from project depends. 2014-12-08 12:57:26 +03:00
Андрей Колченко e84689934d Merge 2014-12-08 12:56:29 +03:00
Claudio Zizza 5b63f4b5d0 tests for command factory created 2014-12-07 23:00:55 +01:00
Ismael Ambrosi 8ae83cbabd Use instanceof instead of method is_a
Since is_a is a method, it is significantly slower than using instanceof

Following is a perfomance comparison:
http://micro-optimization.com/is_a-vs-instanceof
2014-12-05 02:40:30 -02:00
Andrés Montañez ba9b322dab Merge pull request #158 from samuel4x4/develop
Bug fix for scm/force-update, add general/manually task, bug fix for symfony2/doctrine-migrate, improve symfony2/cache-clear
2014-12-01 21:33:21 -02:00
Andrés Montañez 555269bf66 Merge pull request #154 from gudron/rollback_exception
Rollback exception. Fixed bug with deployment description in hosts section.
2014-12-01 21:33:10 -02:00
samuel4x4 4d1048cca6 Add optional parameters for symfony2/cache-clear
Add optional parameters for symfony2/cache-clear task like --no-warmup.
2014-11-24 01:36:08 +02:00
samuel4x4 5eb771bf30 Rename DoctrineMigrate to DoctrineMigrateTask
I hope this is the reason it doesn't works.
2014-11-24 01:08:52 +02:00
samuel4x4 e9e5ab1d45 Fix ManuallyTask namespace
namespace Mage\Task\BuiltIn\General
2014-11-24 00:44:23 +02:00
samuel4x4 94673b4af2 manually task
one more example for the manually task
2014-11-23 23:57:00 +02:00
samuel4x4 41c3e00f67 Task for running multiple manually commands
The purpose of this task is to provide a way to run multiple custom
commands for your specific project, before Magallanes will have build-in
tasks for your needs. Also maybe you'll just not consider you should
create custom tasks for all commands you need (e.g. specific user rights
for specific files and directories).
2014-11-23 23:34:58 +02:00
samuel4x4 c010fc662e Change runCommandRemote() to runCommand()
Change runCommandRemote() to runCommand(), you decide if the command is
running local or remote depending of the stage you put the
scm/force-update task. Remove the last $result =
$this->runCommandLocal($command), not necessary.
2014-11-23 23:03:31 +02:00
Alex V Kotelnikov a632dac80a added in-deploy flag @ rollback task. 2014-11-13 16:47:52 +04:00
Alex V Kotelnikov 5eb26748ab added restriction to run the rollback.
small changes at rollback output.
2014-11-13 16:40:02 +04:00
Alex V Kotelnikov db4b4299c2 added rollback delete default option from yaml configs 2014-11-13 02:07:20 +04:00
Alex V Kotelnikov 8e603bd0d2 fixed bug with a env-configuration containing deployment description in hosts section 2014-11-13 00:13:19 +04:00
Kuba Turek d63d105471 Add ability to set 'verbose_logging' for environment 2014-11-11 20:38:26 +01:00
Kuba Turek 0734c7be0a Check if verbose logging is enabled 2014-11-11 20:34:50 +01:00
Kuba Turek 654753b70f Avoid duplicating output when verbose option is turned on 2014-11-11 20:29:46 +01:00
Kuba Turek 67e00bca59 Add verbose logging state variable 2014-11-11 20:27:33 +01:00
Kuba Turek 575632d62b Enable configurable verbose logging 2014-11-11 20:18:27 +01:00
Андрей Колченко 1dc97d77f8 Fix email. 2014-11-05 17:19:40 +03:00
Андрей Колченко 3a41a860d0 Make target dir before invoking "ln".
Fix bug with spaces in path.
2014-11-05 17:16:55 +03:00
Андрей Колченко ce2da4e270 Getting linked entities. 2014-11-05 16:42:13 +03:00
Андрей Колченко d52927fe07 Get path and strategy. 2014-11-05 16:39:43 +03:00
Андрей Колченко 4c719f5efd PHP 5.3 does not support "[]" brackets. 2014-11-05 15:37:07 +03:00
Андрей Колченко 642773b5af PSR-2 style. 2014-11-05 15:36:14 +03:00
Andrés Montañez 30a53fcfda Merge branch 'master' into develop 2014-11-01 19:48:31 -02:00
Andrés Montañez c34fa53af5 Fixes #121 2014-11-01 19:31:04 -02:00
Andrés Montañez 40e8c33846 Related to #130 2014-11-01 19:19:05 -02:00
Andrés Montañez 8771cf2ab1 Fixes #131 2014-11-01 19:09:25 -02:00
Andrés Montañez e4aafb3d3f Merge pull request #150 from gudron/rollback_exception
Rollback exception
2014-11-01 18:35:12 -02:00
Andrés Montañez 27a4da4115 Merge pull request #149 from gudron/relative_linking
Relative linking @ shared file task.
2014-11-01 18:27:10 -02:00
Andrés Montañez df632b3fe3 Tweak excludes files. 2014-11-01 18:15:39 -02:00
Andrés Montañez a71bd5fca0 Merge pull request #148 from gudron/exclude_from_file
Rsync , TarGz exclude from file
2014-11-01 18:08:08 -02:00
Alex V Kotelnikov b924b92240 added config reload @ after rollback exception 2014-10-31 00:03:31 +04:00
Alex V Kotelnikov 438a81542e changes @ deploy command. added rollback exception functionality. 2014-10-30 23:49:01 +04:00
Alex V Kotelnikov 50e2d6eeb5 small fixes @ link shared files task. wrong constant value 2014-10-30 23:16:07 +04:00
Alex V Kotelnikov 0a14573126 relative linking @ Link shared files task. Added exclusion rules to symlinks creation. 2014-10-30 23:16:07 +04:00
Alex V Kotelnikov 6f551cabf0 added relative linking @ Link shared files task 2014-10-30 23:16:07 +04:00
Alex V Kotelnikov 95f09dc3c9 small fixes @ rsync and targz tasks 2014-10-30 12:31:05 +04:00
Alex V Kotelnikov a66478b3ab exclude from file added.
rebased by upstream
2014-10-29 23:16:52 +04:00
samuel4x4 308a67359c Add task for force updating a working copy
Downloads the latest from remote without trying to merge or rebase
anything. Resets the master branch to what you just fetched. Changes all
the files in your working tree to match the files in origin/master, so
if you have any local changes, they will be lost.
2014-10-29 04:59:58 +02:00
Andrés Montañez 861a823f7e Update AbstractTask.php 2014-10-11 21:16:42 -02:00
Andrés Montañez 74087c9dd9 Tweak 2014-10-11 18:02:16 -02:00
Andrés Montañez 92b22d52a3 Tweak GitRebase and Insight suggestions. 2014-10-11 17:55:08 -02:00
Andrés Montañez 2deaa27a2a Tweak clones. 2014-10-11 17:47:07 -02:00
Andrés Montañez 9653552be7 Text files should end with a newline character. 2014-10-11 15:07:36 -02:00
Andrés Montañez dbcbcb78ed Remove error suppression. 2014-10-11 14:44:48 -02:00
Andrés Montañez f20091afc6 Boolean and Null should be compared strictly. 2014-10-11 14:43:57 -02:00
Andrés Montañez 5d39e46d9e Code should not be duplicated 2014-10-11 14:36:22 -02:00
Andrés Montañez cd4a4f4100 Merge pull request #137 from ramunasd/develop
built-in task for doctrine migrations
2014-10-11 12:31:37 -02:00
Andrés Montañez 7a9495cf44 Issue #130 2014-10-11 12:10:07 -02:00
Kuba Turek 0375a80dcf Fix exit code to 1 due to php exit code that cannot be greater than 254 2014-10-10 21:20:21 +02:00
Kuba Turek dfbe67622d Throw an error in case when command returns code other than 0 2014-10-10 21:14:58 +02:00
Ramūnas Dronga e0430cfb68 built-in task for doctrine migrations 2014-10-08 15:22:08 +03:00
boston b066368a50 SCM: Git clone performance
Via:
- http://stackoverflow.com/questions/1778088/how-to-clone-a-single-branch-in-git
- http://stackoverflow.com/questions/6941889/is-git-clone-depth-1-shallow-clone-more-useful-than-it-makes-out
- http://git-scm.com/docs/git-clone
2014-09-15 16:07:21 +06:00
Andrés Montañez d0e8be2dfe Git Remote Cache #123 2014-09-13 16:45:41 -03:00
Andrés Montañez 1573daa474 Merge pull request #107 from Landkeks/develop-rsync
Fix RsyncTask::excludes().
2014-08-25 14:11:20 -03:00
Andrés Montañez d4763da37b Manual merge for PR #108 2014-08-25 14:09:42 -03:00
Andrés Montañez c3204844ea Add possibility for defining the composer_cmd in the global config. 2014-08-25 14:05:01 -03:00
Kuba Turek 95ffed7e12 Add configurable composer_cmd parameter 2014-08-22 09:54:56 +02:00
Kuba Turek 48420c1c2a Rename composer_path into composer_cmd 2014-08-20 17:45:30 +02:00
Moritz Baumann 3a033b4514 Fix RsyncTask::excludes(). 2014-08-17 22:11:55 +02:00
Andrés Montañez 6196cda70b Issue #99 2014-08-07 16:32:42 -03:00
Andrés Montañez 8bc0a0316e Tweak. 2014-08-07 12:56:19 -03:00
Andrés Montañez de51ce2b04 Issue #51
Possibility of custom commands.
2014-08-07 12:03:11 -03:00
Andrés Montañez 825fc64b0a Issue #47
Movie cleanup of releases on release task.
2014-08-07 11:03:27 -03:00
Andrés Montañez 1bcaca36f0 Issue #62
Add strategy flags.
2014-08-07 10:49:44 -03:00
Andrés Montañez 9c0682d222 Tweak. 2014-08-07 10:29:49 -03:00
Andrés Montañez 846237fabb Tweaks. 2014-08-07 10:12:26 -03:00
Andrés Montañez 7e2d7d4e57 Issue #72
Add -h option to tar command deployment strategy.

     -h, --dereference
           follow symlinks; archive and dump the files they point to
2014-08-06 21:51:17 -03:00
Andrés Montañez 5d728a9105 Proper exit code. Issue #52 2014-08-06 21:43:29 -03:00
Andrés Montañez 8df5534470 Check if classes exists. 2014-08-06 20:41:30 -03:00
Andrés Montañez 981f752c49 Fixed issue #91. 2014-08-06 20:41:23 -03:00
Andrés Montañez 20de8eb7e0 Fix Autoload for Custom Tasks. 2014-08-06 18:25:50 -03:00
Andrés Montañez ce0e707dc6 Support Composer and Symfony App paths. Issue #86
Also specify symfony version (2 o 3).
2014-08-06 17:26:16 -03:00
Andrés Montañez 5fb711593a Add flag --deleteCurrent to delete current release on rollback. Issue #93 2014-08-06 15:03:53 -03:00
Andrés Montañez 2e0c5130dd Fix rollback. 2014-08-06 14:53:42 -03:00
Andrés Montañez 724fc05b9e Tweaks. 2014-08-06 14:35:50 -03:00
Andrés Montañez ec2bb12bf4 Fixes and tweaks. 2014-08-06 14:17:26 -03:00
Andrés Montañez fddeebe59a PHPStorm refactoring. 2014-08-06 14:01:39 -03:00
Andrés Montañez 4c584b2634 Tweaks. 2014-08-06 14:00:11 -03:00
Andrés Montañez 60d16e57f9 Tweak log message. 2014-08-06 13:50:58 -03:00
JoeSimsen 8b86243e34 Bugfix
Extract tar Gz Did not have a $command = in front of it, wich was
breaking the commits
2014-07-31 16:10:46 +02:00
JoeSimsen 82c5305137 Allow a release to be zipped
If you enable the parameter 'releases: compressreleases: true', every
release except the current wil be added to a tar.gz. This is to preserve
diskspace on the remote host.
2014-07-31 15:06:20 +02:00
Andrés Montañez 25de6b0a8f Merge (partial) PR #56 2014-07-30 21:49:41 -03:00
Andrés Montañez b6ab981f4d Tweaks from PR #58 2014-07-30 21:46:27 -03:00
Andrés Montañez 9a58ce56f0 Resolve conflict for PR #61 2014-07-30 21:35:21 -03:00
Andrés Montañez 78379e866f Merge pull request #96 from elnebuloso/bugfix-tar-deployment
bugfix, deployment targz
2014-07-30 21:28:35 -03:00
Andrés Montañez bf902c9853 Merge pull request #95 from voukka/master
Many bug fixes. With this fixes I was able to test my own Tasks! :)
2014-07-30 21:28:09 -03:00
Andrés Montañez 003e36dc64 Merge pull request #87 from WouterSioen/git-rebase-with-releases
Make the git rebase strategy work with releases
2014-07-30 21:26:59 -03:00
elnebuloso b4ce85199d bugfix, deployment targz
- the created tar only includes relative from the defined from
- now it is possible to use absolute path in .mage/deployment/*.yaml from
2014-07-31 01:55:50 +02:00
Vladimir Grigor 11bdd68fff - factored constants out;
- fixed bug: "releases list" command would die checking for unnecessary --release parameter;
 - console prints log file name if if logging is enabled
2014-07-28 15:43:52 +03:00
Vladimir Grigor e7cad31681 fixed a bug: symlink config value was not respected 2014-07-28 13:58:14 +03:00
Vladimir Grigor d495d10aca fixed a bug: if deploy strategy was set to "disable", release was still trying to do remote stuff. Now release step respects strategy. 2014-07-28 13:49:38 +03:00
Vladimir Grigor 5ce3394b3c refactored Autoloader; added support for json encoded format for environment "hosts" option 2014-07-28 11:53:22 +03:00
Vladimir Grigor 6ecaf41336 removed unnecessary checks in Config 2014-07-27 22:53:49 +03:00
Vladimir Grigor eaccc0dab8 refactoring 2014-07-26 15:33:07 +03:00
woutersioen 0ce94c3821 Also use common code in RsyncTask 2014-07-16 17:08:04 +02:00
woutersioen 980d209fb4 Refactor cleaning up releases to a common function. 2014-07-16 17:07:19 +02:00
woutersioen b869876c26 Refactor tar gz to reuse function. 2014-07-16 17:06:00 +02:00
woutersioen f7e2163fed Cleanup releases. 2014-07-16 17:04:23 +02:00
woutersioen 26bc4242d1 Revert excludes 2014-07-16 16:35:18 +02:00
woutersioen f2e01280a5 Fix excludes for releases 2014-07-16 16:32:29 +02:00
woutersioen 014d98bc96 Implement releases in git-rebase
Note: the parameter repository needs to be set to make this work.
2014-07-16 16:29:44 +02:00
woutersioen c7e1175e11 Make file locations work better from global install. 2014-07-16 15:52:23 +02:00
Rodmen 732cc20f1f add user data and message to lock command 2014-06-26 11:05:00 -03:00
Benjamin Mermoz 35301cba8e Fix hard coded 'current' symlink path in RsyncTask 2014-06-17 10:26:32 +02:00
Andrés Montañez 49a7e0857a Missing use statement should be avoided #inslight 2014-06-13 16:25:24 -03:00
Andrés Montañez 1b2188f0b1 Tweaks. 2014-06-13 09:31:53 -03:00
Andrés Montañez e10dea147f Yaml - Replace Spyc with Symfony Yaml Component. 2014-06-13 09:31:44 -03:00
Andrés Montañez d55637a120 Fix ApplyFaclsTask. 2014-06-12 18:24:40 -03:00
Andrés Montañez 92d3845052 Issue #70, makes --release mandatory. 2014-06-12 18:22:13 -03:00
Andrés Montañez 17ebb5b30d Add Rollback command as alias. 2014-06-12 18:16:30 -03:00
Andrés Montañez e01fbc6151 Review and rework Composer tasks. 2014-06-12 17:42:47 -03:00
Andrés Montañez a51056b9c1 Merge pull request #63 from oddnoc/remote-rsync
Add ability to use rsync rather than cp on remote
2014-06-12 17:29:17 -03:00
Andrés Montañez 9bcf8e063d Tweaks on FileSystem Tasks. 2014-06-12 17:25:50 -03:00
Andrés Montañez 4528788d49 Reorganize common Deployment code. 2014-06-12 17:12:30 -03:00
Andrés Montañez b174d04da2 Commented code should not be commited #inslight 2014-06-12 16:50:47 -03:00
Andrés Montañez d17dd0eb27 Code refactoring. 2014-06-12 16:45:40 -03:00
Andrés Montañez 12f42dc110 Tweak SPYC. 2014-06-12 16:35:14 -03:00
Andrés Montañez 66ea107229 Merge branch 'master' of https://github.com/andres-montanez/Magallanes
Conflicts:
	Mage/Task/Factory.php
2014-06-12 16:18:14 -03:00
Andrés Montañez 4e01cc3517 Tweaks and fixes. 2014-06-12 16:17:31 -03:00
Jan Malte Gerth dacfaa2c5e fixes #73 missing "Task" suffix for LinkSharedFiles 2014-06-11 17:35:40 +02:00
Jan Malte Gerth f984531742 fixed failing testing for successful json_decode 2014-05-27 13:57:41 +02:00
Andrés Montañez 75e1131a70 Merge pull request #65 from iambrosi/namespace_fix
Fixed namespace for Filesystem tasks
2014-05-23 05:44:16 -07:00
Ismael Ambrosi a30e6f6193 Removed unused use statements 2014-05-22 23:03:14 -03:00
Ismael Ambrosi eee36a850a Fixed namespace for Filesystem tasks 2014-05-22 22:56:05 -03:00
Fred Condo 1f6da7f8fb Add ability to use rsync rather than cp on remote
This enables finer control (via excludes) when seeding the destination
directory for rsync. Because we know we have rsync available, we can use
rsync rather than cp by using configuration like this example:

	  strategy: rsync
	  rsync:
		copy: true
		copy_tool_rsync: true
		rsync_excludes: ["assets", "silverstripe-cache"]

The default tool remains cp, so this change is backward-compatible.
2014-05-16 12:31:36 -07:00
Andrés Montañez b98082b96f Merge pull request #60 from tonynelson19/patch-1
Only call chown on releases if there's a userGroup
2014-05-14 17:39:29 -07:00
hrakotobe 7ad5403c81 change setting name 2014-05-09 18:15:03 +02:00
hrakotobe 47b089cb3e force use of sh on remote server and make directory ownership check more portable 2014-05-09 17:53:35 +02:00
Tony Nelson ea9c83b07f Only call chown on releases if there's a userGroup 2014-05-08 15:41:05 -05:00
juanda 86ef278607 strategy git-rebase is enabled 2014-05-07 12:55:14 +02:00
Mario Mueller eefec4cbc0 Added three new tasks.
One task for generating the composer production autoloader, one
for linking shared files and folders into the release and
one to set filesystem acls while rolling out a new release.
2014-05-04 08:55:04 +02:00