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

Specify a config file per Collection... possible? #978

Open
jamiebullock opened this issue Dec 6, 2023 · 0 comments
Open

Specify a config file per Collection... possible? #978

jamiebullock opened this issue Dec 6, 2023 · 0 comments

Comments

@jamiebullock
Copy link

jamiebullock commented Dec 6, 2023

I would like to be able to define a set of tasks, and then load those tasks into multiple collections, each with a separate configuration.

Something like this:

tasks
├── __init__.py
├── config_a.yaml
├── config_b.yaml
└── stuff.py

And in the __init__.py

from invoke import Collection
import tasks.stuff

ns = Collection()
ns.add_collection(stuff, 'A')
ns.add_collection(stuff, 'B')

How do I make the 'A' collection use config_a.yaml and 'B' use config_b.yaml?

@jamiebullock jamiebullock changed the title Specify a config file for a Collection... possible? Specify a config file per Collection... possible? Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant