Home avatar

Chris Weyl's Technical Blog

This is my blog, my words; it is not my employer's.

Task and Taskfiles

If you’ve been around a project for any length of time, you’re familiar with the need for automation – specifically, something to keep track of all the little tasks that need to be done over and over again. These tasks are typically at least somewhat deterministic, don’t vary from run to run, and are run by more than one person.

The classic solution here is to use make and a Makefile. For older codebases where you’re only worried about building C or C++ code, this is very acceptable – it’s what make was designed for, after all. make is nearly universally available on Unix-like systems, and it’s relatively simple to use for basic tasks. The challenge comes in when you need to execute non-deterministic tasks; things like running tests, linting code, bringing test environments up and down, and so on. make can handle these tasks but it’s not always the best tool for the job. 1

Linting Thoughts

Linting is an one of those things that can be weirdly controversial. I say weirdly as I cannot quite understand the objections to it – it’s not like we’re all perfect typists, after all. Generally the objections range from “My editor does it for me” to “I forget to run them before pushing!” to my favorite, “They always fail in CI!”

Terraform-Provider-Gitlabci: Register GitLab CI Runners

I’m a huge fan of terraform, so when I needed to build out cloud infrastructure for GitLab CI/CD it was the first thing I reached for. The native terraform-provider-gitlab was very useful, but left out one critical detail: it was not possible to register a runner.

Ouch. 💢

Using a Metadata Proxy to Limit AWS/IAM Access With GitLab CI

The gitlab-runner agent is very flexible, with multiple executors to handle most situations. Similarly, AWS IAM allows one to use “instance profiles” with EC2 instances, obviating the need for static, long-lived credentials. In the situation where one is running gitlab-runner on an EC2 instance, this presents us with a couple interesting challenges – and opportunities.