CI/CD: Versioning and Build Done
Going back to trying to set up semantic version.
Seems like this semantic version tool requires a package.json file in the root of the repo, which is really not something I want to add to my project. I'll take a step back and look for alternatives.
Found a go version of semantic release.
Tried using the go-semantic-release, got it working on the first try. Well, at least the release part.
The problem I'm seeing now is this isn't designed for a monorepo.
I'm really torn between separating everything into multiple repos and keeping the monorepo setup. On one hand, I know how much pain a bunch of repos can cause, but on the other hand, CI/CD tooling would be so much easier to set up. I will also need to eventually open source the cli so people feel comfortable downloading it.
I've decided to move only the CLI to a second repo for now. That way I can set up CI/CD and versioning for both the cli and the api separately. Web is managed by Vercel anyways, so I don't have to touch that yet.
That was pretty easy. Just like that, I have a working (albeit simple) release pipeline that supports all platforms. Nice!
Now I need to set up the api pipeline. That will be a bit more complicated, as I need to build and deploy a Docker image.
Got the building and pushing to Docker Hub working. We can now move onto deployment.
I'll have to set up a simple deploy script that will pull and up the docker-compose and add that to the pipeline. This is an approach I've used previously for wcenzije and it's worked well enough. Not sure if there's anything better (and simple), I'd have to do some research.
Ran out of time though, I'll probably tackle it this weekend.
Deployment TODO:
- set up infrastructure
- set up DNS
- set up SSL
- finish deployment pipeline
I'll try and find a way to automate the DNS and SSL stuff, as that's always the most annoying part of the process, especially if you need wildcard DNS.