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

Allow environment specific .yml file definitions & ability to share duplicate .yml files #2

Open
mackermedia opened this issue Nov 4, 2013 · 6 comments

Comments

@mackermedia
Copy link
Contributor

Currently it checks the directory with the name of your environment for .yml files. It sounds like on chron project, production & integration were symlinked to the development dir.

We have a use case on a current project where we want to define two different .yml files (one per environment) for one resource type, but would like to have a shared .yml file for another type of resource.

Thinking this could be accomplished by putting .yml files that can be "shared" into a shared directory.

Thoughts?

@ltk
Copy link
Contributor

ltk commented Nov 15, 2013

yeah agreed. that symlinking feels rather weird. 👍

@Fosome
Copy link

Fosome commented Jan 13, 2014

@ltk @mackermedia This talk this one through.

@mackermedia
Copy link
Contributor Author

I liked @Fosome's ideas in his gist for defining shared resources.

I hadn't put much thought into it yet other than I'd like to share a resource like PropertyType without needing to override it. Was just thinking some of the resources could be shared, others could be environment specific.

I think it makes sense to allow shared things to run first, and then if you want to customize in one particular environment you could override or add to them. I can picture a scenario where you want an empty (or missing) file for production environment to not create any of a certain type of resource.

@gcapizzi
Copy link

gcapizzi commented Mar 6, 2014

Is there a workaround to share all seed data between environments?

@mackermedia
Copy link
Contributor Author

@gcapizzi Not yet. This issue was created as a reminder for us to work on this at a future time. Feel free to fork, implement, and submit a Pull Request and we'll get it in as soon as we can.

Thanks!

@ltk
Copy link
Contributor

ltk commented Mar 6, 2014

@gcapizzi The effect you're after can be achieved by creating symlinks with the names of your environments, all pointing to a single directory of your choice. Symbolic links are respected by git, so you shouldn't have any issues.

This is definitely an area focus for our own development moving forward.

danroberts added a commit to danroberts/sprig that referenced this issue Apr 29, 2015
back to root seed directory. Fixes vigetlabs#2.

This allows you to have environment specific seeds, while still allowing
for shared seeds between environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants