a few questions (hide yaml/non-yaml tasks, default stages/hosts) #2434
Replies: 2 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
Thank you. 1.Okay, for the reference, this worked: task('deploy:cleanup')->shallow()->hidden(); I wasn't sure that task() would work without a second argument – but it does. 2.Yes, there are many ways to do it. Could there be officially supported attributes "shallow: true" and "hidden: true" for the yaml file? Would make it easier. Just a thought. So I've come to overwrite the function tasks() as follows:
But I also had to copy the large static function "public static function import($paths)" 3.Thanks, that's nice to hear. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I've got a few questions.
1. hide tasks after they've been defined
In my recipe I reuse official tasks
require 'recipe/deploy/cleanup.php';
but I'd like some tasks (all deploy:*) to be hidden from the menu when running plain $ dep.
Can I hide the task after it was defined? I want to hide all the deploy:xxx tasks and call them via invoke/before/grouping in my recipe myself.
2. hide yaml tasks if the last name of namespace contains a dot at the identifier start
Can a yaml task be hidden from the menu if it begins with a dot?
example
initialize should not show up in menu ($ dep).
3. default stages/hosts
Is there a default_stage or default_host variable? When defining a local task I am still asked for a host ("Select hosts: (comma separated)" [...]).
Also having a default host or stage for non-local tasks is nice. There was in v6, but how is it done in v7?
Beta Was this translation helpful? Give feedback.
All reactions