Introduced deployment based on Play application configurations. #1

Merged
merged 1 commit into from Oct 13, 2012

Conversation

Projects
None yet
3 participants
Contributor

eboto commented Oct 12, 2012

Hello!

Thanks for the sweet plug-in. One of our needs at Egraphs was to be able to specify deployment targets in our Play! config files rather than on the Project itself. Basically we have a bunch of different cloudbees app ids that run different configurations of the same app, and we wanted to encode the relationships between the two right there in the Play! config file.

So that's basically what this pull request does. It refactors things a bunch, but the only real change to functionality should be the addition of a project-level InputTask invokable as cloudbees-deploy-config.

For usage, Imagine a play project that contains conf/application.conf, conf/live.conf, and conf/staging.conf Inside of each of those files you could specify a different cloudbees application id: so, live.conf could have cloudbees.applicationId=live-app, where the value corresponds to an existing cloudbees application at egraphs/live-app.

Then you would use the tool like:
> cloudbees-deploy-config live, which deploys the live.conf configuration to live-app
> cloudbees-deploy-config, which deploys the default application.conf to its configured app id
> cloudbees-deploy-config live new-live-app, which deploys the live config to the new-live-app Run@cloud app id, overriding the value in the config file.

I hope this contribution makes sense in the direction you were taking the plug-in!

This is a matter of style, but I like to see errors come first. So if (!archive.exists) error else //do something

since here just glancing at the code, you have to follow the indentation carefully to figure out what that was to.

Yeah I don't have any strong opinion about it, except that I do prefer the guards to be defined in blocks rather than as asserts at the top of the function. For the most part this function was copy-pasted from the previous implementation. Feel free to change it I think the argument makes sense...

imeredith added a commit that referenced this pull request Oct 13, 2012

Merge pull request #1 from ChazInc/play-config-driven-deployment
Introduced deployment based on Play application configurations.

@imeredith imeredith merged commit 77d2654 into CloudBees-community:master Oct 13, 2012

Contributor

imeredith commented Oct 13, 2012

Thanks, I like this. I've cut 0.3 and i'll do a deploy of 0.4-SNAPSHOT with this in it.

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