summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2022-05-23 22:58:16 +0300
committerUri Simchoni <uri@samba.org>2022-05-25 19:54:35 +0000
commit96da11428662c63b033eb18d6adb3f9a734d7394 (patch)
tree5c03fb0ab774995e48a5036a28d29d85990b1b2e
parent4ee29f846fdf53fbbdeff2663798490766947f0e (diff)
downloadsamba-96da11428662c63b033eb18d6adb3f9a734d7394.tar.gz
[ci-images] run podman directly instead of docker link
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>
-rw-r--r--.gitlab-ci-main.yml2
-rw-r--r--bootstrap/.gitlab-ci.yml22
-rw-r--r--bootstrap/sha1sum.txt2
3 files changed, 12 insertions, 14 deletions
diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index 898848e63f4..847e5f87837 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -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.
diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml
index a2d6a17959a..46b0969e1ce 100644
--- a/bootstrap/.gitlab-ci.yml
+++ b/bootstrap/.gitlab-ci.yml
@@ -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)
@@ -38,23 +36,23 @@
# 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" || { \
diff --git a/bootstrap/sha1sum.txt b/bootstrap/sha1sum.txt
index f9021f556cb..0bf21dce1e6 100644
--- a/bootstrap/sha1sum.txt
+++ b/bootstrap/sha1sum.txt
@@ -1 +1 @@
-23a351bc6592a5e943ed72eef0eb5afd19de433b
+eab8114276d8a3062f1f1b19e6906173b4eeeb7a