Build and deploy with CircleCI 2.0
29 of May, 2017
CircleCI opened its 2.0 beta a while ago (it’s still is beta at the time of writing) and I’ve got to try it out few weeks ago.
I did not experience technical issues with it, just some missing features - looks like it’s stable enough and very usable.
I am automating packaging and deployment of dockerised Scala application, which I described in my previous post. There are these two natural steps:
- Build and publish docker image;
- Trigger a deployment of that image into Google Container Engine (my Kubernetes cluster).
This could have been done with previous circle as well, but would require some heavy configuration and customisation of default ubuntu box, which would be quite annoying.
With new process it allows to use separate jobs for each step. In each we can use different images, which simplifies life a lot.
One slight irritation is that at the moment that the only way to transition from one job to another is sending a curl request to start it. So, for instance, on successful build deployment will be invoked by curling the next job. I’m sure there will be better way to do it later, but current workaround is well described in official documentation (it still took some poking around to realise that task sequencing is not default).
Once you join the beta, all you need is place a config in .circleci/config.yml
in new format (see example below).
All the other steps are the same as with v1.
Hope this helps, let me know what was your impressions of new circleci workflow.
comments powered by Disqus