Chauffeur, my little Umbraco deployment tool is chugging along quite nicely. I don’t do a huge amount of work on it, mostly it comes in batches when I get requests from people who are using it. For the release I’ve just cut, v0.12.0, I’ve got quite a lot of changes in it so I wanted to do a bit more of a write up about them.
Side note: I cut v0.12.1 almost straight away because I realised the NuGet logo was broken 😛.
The Chauffeur Scaffolder
I believe this is the killer new feature of Chauffeur!
One of the hardest parts of using deployment tools is how to incorporate them into your existing project, and Chauffeur is no exception. Whether your project is something you’ve worked on for hours or worked on for months, the “Getting Started” is always a pain.
While on the train home last night I pondered this. I started by thinking “What does a Getting Started guide look like?” and I mapped out the steps:
- Install the NuGet packages
- Create your first
- Add the setup steps
- Export your Umbraco structure to a package, which means you have to create a package
- Create a
deliverystep to import that
Well that requires a bunch of manual steps, and the “create package -> setup” step is one that’s really annoying to do (speaking from experience here!) so I started to think on how I could automate that. I’d been toying with the idea of a
create-package Deliverable for a while now and this seemed like a logical intersection, I have some of the insights on that, why don’t I plug it in there.
So I quickly whipped up a GitHub issue and got cracking on the code. My ideal workflow is that you could do:
- Install NuGet package
The new scaffolder will ask 3 questions, the name for the initial
delivery, whether you want the install steps (
install y and
user change-password) and if you want a package generated of your site structure items (DocTypes, DataTypes, etc. excluding content).
Once done it’ll run and you’re ready to check everything and start collaborating!
Document Type Improvements
One of our clients here at Readify is using it on a new project and I was talking to the team on how they are using it and any pointy edges. Their biggest issue turned out to be something that I didn’t even realise was a bug and that is when you import a Content Type (aka Document Type) with a property change it doesn’t get reflected. I found it odd that no one had told me this previously so I did some investigation and found that there’s a problem that I logged on GitHub to track.
The crux, it turns out, is that the Umbraco import engine is designed to be a lot more non-destructive than I realised, and it doesn’t update properties, only adds new ones!
Well good news, in Chauffeur v0.12 this is fixed, I’ve created a bit of an extension over the importer to ensure that we handle that properly inside Chauffeur (and I created a regression test to cover it).
From here I started exploring more of the possible problems that could come up and one that I knew of but never had thought to deal with was removing of Content Types. Now there’s nothing in the Umbraco package engine (which I mostly rely on) that does this, after all, how do you import a delete? so I decided that the easiest way would be to extend the existing
content-type deliverable with a
remove feature command. Now you can do:
umbraco> content-type remove <alias>
Another piece of feedback the team gave me was they’d like a way to remove a property, so I have added that too:
umbraco> content-type remove-property <alias> <property alias>
This is a small task that’s just been hanging out in my backlog, I wanted to have a way that you could add comments to a
delivery file. A line comment is denoted by
## so you can do something like this:
## Create the Umbraco database install y ## Set the admin password to something super secret user change-password admin passwordpassword
Again, it’s the small things that are nice.
Another thing that’s always annoyed me is how sloppy the output looked when you used
content-type get-all (or
get <alias>), and this was because, well, output formatting isn’t that easy when you’re using
Console.Out. But I decided it was time to get it cleaned up and make a pretty table that has everything lined up. With this change we go from this:
Id Alias Name Parent Id 1067 demo Demo -1 Property Types Id Name Alias Mandatory Property Editor Alias 73 someProperty Some Property False Umbraco.TextboxMultiple
Id | Alias | Name | Parent Id 1067 | demo | Demo | -1 Property Types Id | Name | Alias | Mandatory | Property Editor Alias 73 | Some Property | someProperty | No | Umbraco.TextboxMultiple
That looks much better.
I’m starting to think about going “v1” with Chauffeur, it’s only been about 3 years since I cut the first lines of code for it, so it’s probably time. So that means I want to put a bit more polish on things and one of the things in doing that is I wanted a logo.
Well, I found one, I’ve grabbed an image from The Noun Project which is available from Ed Piel and used under Creative Commons from The Noun Project.
So everyone, install Chauffeur v0.12 and get deploying!