Support building images with rootless podman

What does this MR do and why?

This introduces a new CI/CD variable AUTO_DEVOPS_PODMAN, when set to true it will not start any dind services, but instead run a rootless podman pod to build and push a container image.

To achieve this we created a new podman image that can build containers from a Dockerfile or by using a buildpack. The MR for the image is gitlab-org/cluster-integration/auto-build-image!201 (merged).

References

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

An example of how we envision this to be run is in https://gitlab.com/hairmare/container-image-just-the-dockerfile. The example skips most of AutoDevops by calling the Build job directly.

How to set up and validate locally

  1. Create a repo that contains a simple Dockerfile
  2. Include the forked Build pipeline from the repo:
variables:
  AUTO_DEVOPS_PODMAN: true
include:
  - project: 'gitlab-community/gitlab-org/gitlab'
    ref: dev/build-with-podman
    file: 'lib/gitlab/ci/templates/Jobs/Build.gitlab-ci.yml'
  1. watch it build and push an image without dind

🔧 with at Adfinis

Edited by Lucas Bickel

Merge request reports

Loading