A short history
It has been a while since I wrote a blog entry on my homepage. Most recent entries are more a repo for me to remember how to achieve stuff in my favorite tools like java, R and shell. But since the amount of snippets and howto’s is growing, I experience the urge to
environmentalize or contextualize my snippets: Writing stories about what thrills me to add a certain snippet to the repositories. Accordingly, I am now busy writing about my latest project. What it was? Gitlab’s continous integration and delivery.
Git vs. Gitlab
I worked a lot with git the last couple of years, mostly with github. From friends I heard that gitlab would be much cooler. Why?, I asked. Because it offers what git offers and more.
Untill beginning of this year, I had no idea what this
and more would be or eventually be good for. Then I started a Java programming course at the open university and learned that it indeed offered more than just a platform for administrating version of a code repo. It had schedules, Kanban boards etc. Things you need when organizing the development of a bigger project
As I work on different platforms and different computers, I had difficulties maintaining my homepage. To get git on every instance was not as much of a problem. But you also need hugo, a good editor (Sublime text 3!!!), an ssh key on each machine. Finally, when deploying new files to my host, permissions for the folder needed to be adjusted in order to get the site running. In sum, a couple of things I had to configure and many steps to do before publishing had taken place, which in the end increased the threshold to post stuff.
The solution: Continous integration and development
Having said this, I had gitlabs CI/CD feature in my mind and thought they might provide a solution for this problem. If I focus on writing a post, commit it to gitlab this might trigger a publishing process that put my new post on my website. And this is what gitlab provides.
There are some things you need to know for this feature. In one word: Docker. Gitlab allows you to publish a docker container on their server. If you build it from an image, that knows to handle bash and apt-get, you can install almost every tool and run it with the code of your repo on top. I did so be wgetting the hugo code, building it in my container, running my repo through the processor and then scp the result to my host. It worked quite well and is hopefully one of the first projects solving a annoying problem.comments powered by Disqus