Monthly Archives: June 2014

Deployinator

At work I typically deploy  WSP’s to our environments.

A situation came up where it was necessary to redeploy a WSP multiple times, maybe dozens, as a developer worked through an issue.

We needed a fast way to allow the developer to deploy the WSP’s, but with a catch – we couldn’t give him RDP access to the server, and I knew that meetings and such would prevent me from turning around the requests as quickly as needed.

The solution:

Deployinator

I configured this script to run as a scheduled task in Windows, running every 2 minutes.
(For help on scheduling a task, see Schedule your PowerShell Scripts using the Windows Task Scheduler and it’s accompanying 2 min video)

Notes are below the script so be sure to scroll down…

The WSPDropFolder is shared (ie a windows shared folder on the server) with the developer – the developer is the only one who has access so that should help on the security side of things.

The Script checks to see if the file is there, it’s looking for a specific file, by name – this helps ensure the script is only used to deploy the agreed upon solution and not used for general deployments.

After the Script updates the WSP in sharepoint, it moves it to the Archive folder and date stamps it.

It then finishes things up by sending the developer, and myself an email so we both know the deployment completed.

“Using” the script is simple -the developer copies the WSP for deployment to the WSPDropFolder, then, within 2 minutes the script picks up the file and deploys it, the developer will see the folder is again empty, and will receive an email confirmation.

If the developer needs to redeploy, he just puts a new file in the WSPDropFolder and the process repeats.

It’s worked out great so far, allowing the developer to make and test multiple revisions to his code quickly, and without my intervention.

– Jack