The mostly technical DevOps blog

I write about things. Mostly music, and DevOps related topics

View My GitHub Profile

Fuel my coffee addiction https://cafecito.app/skyok

5 March 2021

Experimentation blues: implementing werf for the greater good (Part 2)

by ~sky


This will be brief, and I’ll start by saying two things:

  1. I’m alive
  2. Jenkins has earned my eternal hatred

It’s beside the goal of this blog, but I need everyone to get context on the second point. I’ve been, according to docker’s image pull logs, trying to create a sane Jenkins setup with ephemeral docker build agents for 4 months now.

But regardless, I eventually gave up, and instead opted for a more modern solution: Github Actions

The reason for this post being brief, is that all I need to highlight is Flant’s own actions repo

Thanks to this, the trivial implementation ended up looking siple enough:

name: Docker Image CI

on:
  push:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: werf/actions/build-and-publish@master
      env:
        WERF_LOG_VERBOSE: "on"

An important thing to note, is that by default the built-in publish option pushes images to Github’s own repository, and no inputs are exposed to change this. So if you want to use an external repository, your pipeline would end up looking different.

Closing up, I guess what’s next is trying deployment via the converge action, and migrating to 1.2. I noticed just today that Flant published a migration guide covering this exact concern of mine.

Stay tuned for the next blog where Kubernetes earns my eternal hatred as well.

tags: