Skip to content
Snippets Groups Projects

Move Docker image building from Jenkins to GitLab CI

All threads resolved!

Instead of building all images individually, try and build Apertis-based ones from the same common ground. First create a fairly basic Apertis ospack with a few development tools in, then create a Docker image out of it and layer things on top of it.

This unifies the previously separate overlays for the package builder and the package source builder, only keeping the real differences in their respective overlays.

We opt to not use Docker proper since it requires non-trivial Docker-in-Docker setup. Makisu, which could be used as an alternative, unfortunately, has buggy implementation of the ADD command, leaving us the only option to use Kaniko.

The docker building step is templated in .gitlab-ci.yml to avoid repetition. The Debian-based images don’t normally have to depend on the rootfs building step, but to be able to run them asynchronously in the same pipeline stage we need to declare the dependency anyway, as GitLab CI does not currently support empty needs lists.

The branches named apertis/* build their respective Apertis releases, everything else builds the default defined in the CI YAML file.

The jobs for apertis/* branches tag their build images as latest, every other job uses the branch name.

There is also an alternative (commented out) algorithm for getting the tag: if the branch matches the RELEASE variable (sans apertis/ prefix), it is tagged latest, otherwise the branch name. This would imply a workflow involving patching the RELEASE variable value in the pipeline each time we branch. (removed due to the lack of objections to the current implementation)

For robustness, the debos rootfs step uses a stable v2020 image builder step instead of the currently built one.

Edited by Andrej Shadura

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Emanuele Aina
  • Emanuele Aina
  • Emanuele Aina
  • Looks good to me, just a few nitpicks. :)

  • Andrej Shadura added 1 commit

    added 1 commit

    • 2826f4d8 - Apply suggestion to .gitlab-ci.yml

    Compare with previous version

  • Andrej Shadura added 1 commit

    added 1 commit

    • 5b22cad3 - Move Docker image building from Jenkins to GitLab CI

    Compare with previous version

  • Andrej Shadura added 1 commit

    added 1 commit

    • 71886e3f - Move Docker image building from Jenkins to GitLab CI

    Compare with previous version

  • Andrej Shadura added 2 commits

    added 2 commits

    • 1e07fdf7 - Move Docker image building from Jenkins to GitLab CI
    • 73330fed - scripts: Disable http pipelining similarly to what 7456f3f7 did

    Compare with previous version

  • Emanuele Aina
  • Andrej Shadura added 2 commits

    added 2 commits

    • ec9b7bea - Move Docker image building from Jenkins to GitLab CI
    • 28c78981 - scripts: Disable http pipelining similarly to what 7456f3f7 did

    Compare with previous version

  • Andrej Shadura changed the description

    changed the description

  • Emanuele Aina resolved all threads

    resolved all threads

  • Emanuele Aina
  • Andrej Shadura added 2 commits

    added 2 commits

    • 2900db0f - Move Docker image building from Jenkins to GitLab CI
    • 85165fd2 - scripts: Disable http pipelining similarly to what 7456f3f7 did

    Compare with previous version

  • Emanuele Aina resolved all threads

    resolved all threads

  • Emanuele Aina enabled an automatic merge when the pipeline for 85165fd2 succeeds

    enabled an automatic merge when the pipeline for 85165fd2 succeeds

  • merged

  • Please register or sign in to reply
    Loading