-
Notifications
You must be signed in to change notification settings - Fork 177
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
Command & target re-use #130
Comments
Good points. Thanks for raising this. Do you have any potential solutions in mind? |
In order to solve my use case, I'd like the option to import one Supfile into another, going directly against
In my mind, 80:20 solution would be to import commands from one Supfile into another so that I can invoke command from the imported one by running the latter. The command would be executed in the context of the importing Supfile (with its network and variables). There are several obstacles I can see immediately:
There are probably even more issues I can't think of right now. My question is if anything like this would be welcomed at all. Admittedly, I might be an outlier with this need and I can see that such a feature could easily balloon up and create unnecessary complexity. |
We heard people asking for reusable Yeah, you raised good points. This can easily grow out of scope to a very complex solution with lots of edge cases. I wonder what the rest of the community thinks about this. Or if they have any other elegant solutions in mind.. |
Thinking about, you're right. In our current state, we'd probably reuse networks as well. I'm wondering about input from others, this seems like a thing every other user would use. |
definitions are already cascading, so the last definition takes precedence, targets just fetch the defined commands so they will follow. |
I've been playing around with Sup and it's elegant and simple, but I'm hesitant to use it as a deploy tool for our projects because I miss re-use options.
I created a Supfile with around 200 lines as a prototypúe. It does pretty much everything that I expect it to do (and few things on top of it), but it's tailored to one service. But I have eight different services. Some aspects of the deployment process should be identical (except for some names), e.g. directory and file structure setup, compilation, Slack notification, some are different or not used in all cases, e.g. upload of some config files. I'd like to re-use the identical steps (and preferably sequences of steps) between the different services.
As far as I can tell, the only way to somehow achieve it (apart form copy & paste) is to use multiple Supfiles and call the shared one from the project-specific one. However, I don't see any way to only define networks in the project-specific one which kinda makes sense but how do I achieve some level of re-use? I really want to avoid copy & paste.
The text was updated successfully, but these errors were encountered: