Skip to content

WIP: Kubernetes pre-build container

What does this MR do?

It uses the predefined images for Pre-/Post-Build steps (like docker executor does) as sidecar container for the runner Pods.

I need some help in how to handle the predefined images. In docker executor has them embedded but I don't think this is possible for kubernetes. Is there any reason to not push the predefined images to Docker Hub and pull from there? This is what I did for testing:

for arch in arm x86_64; do
  wget https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/master/docker/prebuilt-$arch.tar.xz -O /tmp/prebuilt-$arch.tar.xz
  docker import prebuilt-$arch.tar.xz jaymedh/gitlab-ci-runner-prebuild-$arch:latest
  docker push jaymedh/gitlab-ci-runner-prebuild-$arch:latest
done

Why was this MR needed?

It removes the need to have git and Gitlab-Runner binary in the user images. Thus makes it easier to run builds on user provided images.

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Merge request reports