I finished most of the CI/CD pipeline I’ll use to build and release mealplanner and it only took me ~2-3 days! Since I made everything work in docker locally there was minimal debugging and tweaking for me to do to get everything working in gitlab w/ the same docker containers (barring one very annoying issue).
First, a description of the CI/CD pipeline:
I think most devs are probably familiar w/ github actions, where you define different workflows, each consisting of script chunks that are executed within different docker images. Gitlab’s offering differs from this in that … it’s … more … pipeline-y?
Instead of an arbitrary number of workflows that may or may not run, there is just one workflow, the entire pipeline. This pipeline consists of a list of stages and jobs run in containers or VMs, where jobs are grouped by the stage they belong to, and stages are executed in order.
So, mealplanner’s pipeline has three stages: test, build, release. The test stage runs unit and e2e tests, the build stage builds release bundles for linux, mac and windows, and the release stage uploads the builds to gitlab. Simple. And it all worked! Mostly.
Only issue I had was with running e2e tests. tauri
is like electron in that it lets you create desktop apps using web tech. Unlike electron, it uses the browser present on the OS in question instead of shipping it’s own copy of chromium & node with every app. Which works just fine for me on my Ubuntu install. However, on the debian based docker image I used for CI, it did not.
Turns out the docker image, which was based on debian bookworm, had a slightly newer version of GTK webkit installed, with a weird little bug that broke a library my app depended on, but without an error message: details. I had to isolate the cause by removing code from my app one chunk at a time to see if the problem was still there, which was not fun.
But anyway, the build jobs were working pretty quickly, the unit tests passed quickly and the e2e tests are now running! They don’t currently pass, tho. This is because they depend on the database of plated recipes I made, but I have no way to distribute it yet. Which is what I’ll work on next.