Tell me more ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Has anyone worked out a clever way to auto install/uninstall packages from their orgs? I know this isn't natively supported but is a real pain point for iterating.

I have soap api driven calls to update the configurations to the org, but I would like to kick off the whole process automatically!

share|improve this question
1  
do you want to kick it from within SF? trigger? automated process? or an external 3rd party maybe? that hits a webservice? – Saariko Oct 4 '12 at 19:17
Not necessarily from SF, or trigger, just an automated process. So that after I successfully upload a package or beta-package, I can give my process some credentials for a target org and get it installed before kicking off the configuration. – jordan.baucke Oct 4 '12 at 19:21

3 Answers

up vote 5 down vote accepted

I created an installer driven by Selenium WebDriver, which is available here: https://code.google.com/p/force-managed-package-installer/

share|improve this answer
Very cool, nice job! Does it wait for the package install to complete when the wizard drops into background processing? I assume by querying the Packages Installed page? – Andrew Fawcett Feb 21 at 12:13
Thanks for the feedback! I don't have it querying the Packages Installed page yet, but it could be done in the future. – Sinead Coyle Feb 21 at 17:19
Awesome @SineadCoyle just ran it and it worked great for installing my package. I built something similar out of the Selenium for Ruby Gem, but I ran a couple of extra steps deploying some page layouts (metadata api) and the enterprise wsdl to configure users preferences post install for the app. Is that by any chance what you do it configure security settings from JSON? – jordan.baucke Feb 22 at 23:23
1  
@jordan.baucke - The JSON is for custom settings applied to each profile (it's the penultimate step of the managed packages I was testing it on). Haven't gotten as far as using the metadata api with it. – Sinead Coyle Feb 25 at 17:12
Nice! I gave you the right answer due to it's completion (sorry @Kevin P) – jordan.baucke Feb 25 at 17:18

Jordan,

I've used webrat and / or mechanize to do this in the past.

If you'd like I can help you kick out a script to do it.

share|improve this answer
yes please! Would like to see it – jordan.baucke Oct 4 '12 at 21:46
I would also be interested in this. – Daniel Blackhall Oct 4 '12 at 23:25
1  
Jordan, this gist: gist.github.com/1f099c057f71451fbe94 contains the basics of a Ruby + Mechanize script that will login and then trigger a package install. NB: this will not complete the install! you'll have to extend/finish the script to match any checkboxes or fields you need filled in. – Kevin P Oct 12 '12 at 15:51
It's a start, think you Kevin! – jordan.baucke Oct 16 '12 at 21:35

I've done it in the past with a screen-scraping approach, using (separately) Selenium, Watir, and JWebUnit. Also used it for automating deployment of metadata not supported by the API (e.g. time-based workflow rules, some of those little annoying checkbox settings, common configuration clicks, etc). Watir would be my first choice if I wanted something more flexible and database-driven/powerful; Selenium if it was more of just a record-playback automation.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.