Blog Post

Continuous Integration / Deployment

by: Simon Hughes
date: Saturday, Jan 5, 2019
category: my-technology devops azure continuous-integration

One of the key pieces of advice I give my clients is to automate as much as is reasonable. If you find any team member doing the same task a number of times then you should invest the time to automate it.

As my previous blog post [This Sites Technology] ( https://simonhughes.com/blog/this-sites-technology/) I explained how I use Hugo to generate the static html from this site, which is all generated from markup and templates. This was a great start, but as soon as I started writing a few blogs posts I found constantly rebuilding the site, and deploying it got real tedious.

Automation to the rescue, and in this case Azure DevOps

The first step in the process was to remove everything not required, and then add the source into a git repo in the Azure DevOps space, and since Microsoft will now allow any number of Private repos, there is no costs involved.

Azure Pipelines

Once the sourcecode is all in the right place, I create DevOps pipeline to manage the build. I created a simple 4 step build process including:

  • Getting the source from the git repo
  • Installation of Hugo on the build agenct
  • Run Hugo to generate the full html site
  • Post a message to my slack #ci-builds channel to alert me to the status

I then added a simple trigger to start the build process on every successful git commit.

Now we have the full build for the site, I wanted to automate the deployment as well, so I created a 2 stage release pipieline, which included the following:

  • Deploy the HTML via FTP
  • Notify slack to alert to a sucecssful deployment

The process of manually building and deploying the website only took 10 minutes, but investing 1 hour in automating the whole process will reap rewards over the years to come. Sometimes its the small changes that add up to something big.

If you want any more info on how to start on this journey please feel free to contact me, pick up the phone or drop me an email.

Related Blog Posts

This Sites Technology

Today I thought it was worth writing a quick blog post to detail the technology I used to build this site, and why. Within the industry if you want a small site that's easy to update the default answer is WordPress. I do like to be different, and challenge the obvious to ensure the best results for my clients, so I pushed myself to find a better solution.

Read More