[ci-images] use podman instead of docker
authorUri Simchoni <uri@samba.org>
Mon, 23 May 2022 17:42:55 +0000 (20:42 +0300)
committerUri Simchoni <uri@samba.org>
Wed, 25 May 2022 19:54:35 +0000 (19:54 +0000)
Use podman as image building tool instead of docker. The image-creation
pipeline still runs on docker only (until gitlab-runner supports
podman), but the pipeline image may emply podman instead of docker to
build images.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
.gitlab-ci-main.yml
bootstrap/.gitlab-ci.yml
bootstrap/sha1sum.txt

index 02b22b1571f96e3110dbaa651da43ee75f1af12a..898848e63f4b5ed721440013f93e508c17a0b8f2 100644 (file)
@@ -42,7 +42,7 @@ variables:
   # Set this to the contents of bootstrap/sha1sum.txt
   # which is generated by bootstrap/template.py --render
   #
-  SAMBA_CI_CONTAINER_TAG: a6e30c371ba434b89af5628bd1974e5cc947eb9f
+  SAMBA_CI_CONTAINER_TAG: 23a351bc6592a5e943ed72eef0eb5afd19de433b
   #
   # We use the ubuntu1804 image as default as
   # it matches what we have on sn-devel-184.
index 111be1556ffb255ada9df8d63eb09afd2160ee5e..a2d6a17959a803d968ff60aab79202e4642b3a22 100644 (file)
@@ -1,8 +1,6 @@
-services:
-  - docker:dind
 
 .build_image_template:
-  image: docker:latest
+  image: quay.io/podman/stable:latest
   stage: images
   tags:
     # We need to make sure we only use gitlab.com
@@ -15,6 +13,8 @@ services:
     SAMBA_CI_IS_BROKEN_IMAGE: "no"
     SAMBA_CI_TEST_JOB: "samba-o3"
   before_script:
+    # hack to keep changes to minimum at this stage
+    - ln -s /bin/podman /usr/local/bin/docker
     # Ensure we are generating correct the container
     - uname -a
     - cat /etc/os-release
@@ -32,8 +32,8 @@ services:
     docker build -t ${ci_image_name} --build-arg SHA1SUM=${SAMBA_CI_CONTAINER_TAG} bootstrap/generated-dists/${CI_JOB_NAME}
     ci_image_path="${SAMBA_CI_CONTAINER_REGISTRY}/${ci_image_name}"
     timestamp=$(date +%Y%m%d%H%M%S)
-    docker_hash=$(docker image inspect --format='{{index .Id}}' ${ci_image_name} | cut -d : -f 2 | cut -c 1-9)
-    timestamp_tag=${SAMBA_CI_CONTAINER_TAG}-${timestamp}-${GITLAB_USER_LOGIN}-${docker_hash}
+    container_hash=$(podman image inspect --format='{{ .Id }}' ${ci_image_name} | cut -c 1-9)
+    timestamp_tag=${SAMBA_CI_CONTAINER_TAG}-${timestamp}-${GITLAB_USER_LOGIN}-${container_hash}
     samba_repo_root=/home/samba/samba
     # Ensure we are generating the correct container that we expect to be in
     echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
index 9c3a115d95f0465ae47132ba1a256b462662de22..f9021f556cb2c6cd648174875d401fc6c4405016 100644 (file)
@@ -1 +1 @@
-a6e30c371ba434b89af5628bd1974e5cc947eb9f
+23a351bc6592a5e943ed72eef0eb5afd19de433b