VSTS task groups

Most web applications follow the same deployment steps:

  1. Download the deployment package (artifact)
  2. Unzip it
  3. Connect to the Azure resource you’re targeting
  4. Push deployment content to the server

Mine tend to follow this but adds a couple steps:

  1. Download the deployment package (artifact)
  2. Unzip it
  3. Connect to the Azure resource you’re targeting
  4. Push deployment content to the server
  5. Install NPM
  6. Install gulp
  7. Run gulp to minify/obfuscate JS/CSS
  8. FTP content (CSS/JS/fonts/images) to CDN

My additional steps (5-8) are replicated over and over in each of my release definitions (I used to do 5-8 during build, but since moving to web.config transformation during release, that task as been moved to the CD portion).  Adding and maintaining these steps to every single release definition can be quite burdensome when making updates.  It would be nice if I could, I don’t know, group them and ask for only the information I need that differentiates the actions from definition to definition?

Task Groups

Task groups are Microsoft’s way of grouping definition tasking patterns in such a way that you can reuse the pattern across your definitions.  My 4 tasks it takes to extract, install npm, use gulp to minify/obfuscate and then FTP the content to my CDN becomes one task with a couple fields to fill out.  I go from this:

group-task-before

to this (the four tasks are merged into the “Task Group: FTP Content to CDN” task):

group-task-after

I only need fill those handful of fields and I’m up and running.  Combine that will VSTS’s variable groups and the only field I need change is the Ftp.RemoteDirectoryRoot so my environments are deployed to different locations.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: