[ci-images] run podman directly instead of docker link
authorUri Simchoni <uri@samba.org>
Mon, 23 May 2022 19:58:16 +0000 (22:58 +0300)
committerUri Simchoni <uri@samba.org>
Wed, 25 May 2022 19:54:35 +0000 (19:54 +0000)
Instead of having a symbolic link from docker to podman,
use podman directly. This is made for better clarity, and
because docker and podman are not 100% intechangeable in this
script.

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 898848e63f4b5ed721440013f93e508c17a0b8f2..847e5f87837139e6e176c541bf47d1c6cea63ae4 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: 23a351bc6592a5e943ed72eef0eb5afd19de433b
+  SAMBA_CI_CONTAINER_TAG: eab8114276d8a3062f1f1b19e6906173b4eeeb7a
   #
   # We use the ubuntu1804 image as default as
   # it matches what we have on sn-devel-184.
index a2d6a17959a803d968ff60aab79202e4642b3a22..46b0969e1ce18c68e673f8803de8f8bd6c6d028d 100644 (file)
@@ -13,8 +13,6 @@
     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
@@ -29,7 +27,7 @@
   script: |
     set -xueo pipefail
     ci_image_name=samba-ci-${CI_JOB_NAME}
-    docker build -t ${ci_image_name} --build-arg SHA1SUM=${SAMBA_CI_CONTAINER_TAG} bootstrap/generated-dists/${CI_JOB_NAME}
+    podman 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)
     container_hash=$(podman image inspect --format='{{ .Id }}' ${ci_image_name} | cut -c 1-9)
     # Ensure we are generating the correct container that we expect to be in
     echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
     diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
-    docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
+    podman run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
         /bin/bash -c "echo \"${SAMBA_CI_CONTAINER_TAG}\" > /tmp/sha1sum-tag.txt; diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt"
-    docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
+    podman run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
         diff -u bootstrap/sha1sum.txt /sha1sum.txt
-    docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
+    podman run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
         bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
     diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
     # run smoke test with samba-o3 or samba-fuzz
-    docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
+    podman run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \
         /bin/bash -c "sudo chown -R samba:samba ${samba_repo_root} && export PKG_CONFIG_PATH=/usr/lib64/compat-gnutls34/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig && script/autobuild.py ${SAMBA_CI_TEST_JOB} --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
-    docker tag ${ci_image_name} ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG}
-    docker tag ${ci_image_name} ${ci_image_path}:${timestamp_tag}
+    podman tag ${ci_image_name} ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG}
+    podman tag ${ci_image_name} ${ci_image_path}:${timestamp_tag}
     # We build all images, but only upload is it's not marked as broken
     test x"${SAMBA_CI_IS_BROKEN_IMAGE}" = x"yes" || { \
-        docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY; \
-        docker push ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG}; \
-        docker push ${ci_image_path}:${timestamp_tag}; \
+        podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY; \
+        podman push ${ci_image_path}:${SAMBA_CI_CONTAINER_TAG}; \
+        podman push ${ci_image_path}:${timestamp_tag}; \
     }
     echo "Success for ${ci_image_path}:${timestamp_tag}"
     test x"${SAMBA_CI_IS_BROKEN_IMAGE}" = x"no" || { \
index f9021f556cb2c6cd648174875d401fc6c4405016..0bf21dce1e6f7f2f1aa16ffdb15223b288f0ca39 100644 (file)
@@ -1 +1 @@
-23a351bc6592a5e943ed72eef0eb5afd19de433b
+eab8114276d8a3062f1f1b19e6906173b4eeeb7a