Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for transport.fly #66

Open
basz opened this issue Jan 26, 2015 · 7 comments
Open

support for transport.fly #66

basz opened this issue Jan 26, 2015 · 7 comments

Comments

@basz
Copy link

basz commented Jan 26, 2015

Is there a -native- way to run sub-tasks, something similar of

transport.exec('fly build-phar:prod');

The above works, but ANSI colors are lost and we get nested output.

localhost ● ok
# transport.exec starts here
localhost $ fly build-phar:prod
localhost > ✈ Running build-phar:prod
localhost > ✈ Flight to localhost started
localhost > localhost $ echo Compiling Phar executable 
localhost > localhost > Compiling Phar executable
localhost > localhost ● ok
localhost > ✈ Flight to localhost finished after 18 ms
localhost > ✈ Flightplan finished after 19 ms
localhost ● ok

ps. Apologies if this is not the place for support. Where should I ask these questions?

@pstadler
Copy link
Owner

You could try to execute plan.run(task, target, options), fly does the same.

Please note that I never tried this, but I understand the use case, so please let me know if this works out for you.

@pstadler
Copy link
Owner

Another idea is to write your tasks like this:

plan.local(['build-phar', 'deploy'], ...);
plan.local(['deploy'], ...);

When you now run fly deploy, the build-phar task is executed as well.

@ravi
Copy link

ravi commented Jan 26, 2015

Had a long chat with @pstadler many centuries ago on a similar issue but now I cannot find it. I wanted to be able to do two things: (1) compose tasks using other tasks, (2) be able to say: fly task1,task2,task3:destination .......

After various stops and starts, I have a framework built on top of Flightplan to obtain the above. Not entirely sure that this is the right way to go about it.

@basz
Copy link
Author

basz commented Jan 26, 2015

plan.run(task, target, options) does work indeed. however the current task isn't halted. can't rely on its result therefore.

i'v opted for exec('fly ...'), for now.
thx

@pstadler
Copy link
Owner

@basz thanks for reporting back.
@ravi see #45. I wouldn't call this a discussion, as you didn't explain me that the current implementation is not enough for your needs.

So there are two use cases:

  1. Running multiple tasks from command line (e.g. fly task1,task2:target)
    This could be done and makes sense somehow. Also the refactoring from 0.4.x to 0.5.x definitely makes this way easier to implement.

  2. Running a task from a running task
    Not sure about this one.

@ravi
Copy link

ravi commented Jan 26, 2015

@pstadler fair enough, I didn't want to get too deep into the matter on #45 (thanks for finding that) because I figured the need may be specific to me.

@oliverzy
Copy link

oliverzy commented Feb 3, 2015

Let me add case 3:
task1 has a dependency on task2, flightplan needs to provide a way to define this relationship.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants