Release Events in TaskCluster!

I already wrote a tiny note on ‘release’ event feature that I added to TaskCluster-GitHub. Here, I’m going to tell a bit more about it.

TaskCluster-GitHub is a CI service that listens to GitHub events and schedules tasks in TaskCluster according to the user settings in the .taskcluster.yml file. There were two such events that TaskCluster-GitHub handled before: push and pull request, meaning that every time somebody committed something to the repository or opened/closed/reopened a pull request, TaskCluster-GitHub would react and schedule the tasks needed (something like cloning the repository, installing the dependencies, compiling the app and running tests).

From now on, our users can also make use of the release event: TaskCluster-GitHub will trigger tasks when a new release or tag is created in the repository. Of course, a tag is nothing more than a branch, so we could use the push event. However, regular push doesn’t contain information specific to tags, and working with a dedicated release event is more convenient. Besides, some users may wish to trigger tasks for pull requests and releases only, or restrict certain tasks to happen exclusively for releases — it is possible now!

The biggest challenge was debugging a typo. I’m glad that typo happened though, because it prompted me to dive deeper into the code and even make a couple of diagrams on paper. Now that I switched to other tasks, these diagrams come in extremely handy. In fact, I think it’s a good practice to make this sort of diagrams when you start reading somebody’s code, because human memory is far less reliable than computers’ :)