GradleMongoPlugin icon indicating copy to clipboard operation
GradleMongoPlugin copied to clipboard

Allow provisioning from JSON files

Open joelchrist opened this issue 7 years ago • 5 comments
trafficstars

Not really an issue, just wondering if there's an easy way to provision the Mongo instance with test data?

joelchrist avatar Dec 06 '17 14:12 joelchrist

Hmm interesting idea. Do you have a proposal for how you'd like this to work?

roberttaylor426 avatar Jan 18 '18 17:01 roberttaylor426

@roberttaylor426 I haven't given it much thought, but my best guess would be some sort of configurable init directory. This directory could contain either .js files which would be executed by the mongo shell, or .json files which could be imported by the mongoimport command. I think the former would be better since we'd put the responsibility for configuring a database, collection etc. with the user.

EDIT: The most important thing would of course be keeping the provision project specific, so a config directory of some sort is definitely the way to go.

joelchrist avatar Jan 18 '18 20:01 joelchrist

Sounds reasonable. Would you like to raise a PR to introduce this functionality?

roberttaylor426 avatar Jan 20 '18 11:01 roberttaylor426

@roberttaylor426 I'll try. My experience developing Gradle plugins is basically zero, the same goes for Groovy. If it's anything like Java I'm sure I'll manage. I'll dive in and raise a PR when it's finished.

joelchrist avatar Jan 20 '18 18:01 joelchrist

Great stuff! Feel free to ask if you need any pointers.

On 20 Jan 2018 18:04, "Joel Christ" [email protected] wrote:

@roberttaylor426 https://github.com/roberttaylor426 I'll try. My experience developing Gradle plugins is basically zero, the same goes for Groovy. If it's anything like Java I'm sure I'll manage. I'll dive in and raise a PR when it's finished.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sourcemuse/GradleMongoPlugin/issues/50#issuecomment-359190368, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgp-O7f33dais-qgNmtUzib10UbFxAZks5tMiq_gaJpZM4Q4BT_ .

roberttaylor426 avatar Jan 20 '18 18:01 roberttaylor426