From ea0c55d8639fa09d0691d2933437ea23fd04d6ff Mon Sep 17 00:00:00 2001 From: Gitouche <26656-gitouche@users.noreply.framagit.org> Date: Sat, 21 Oct 2023 16:39:11 +0200 Subject: [PATCH] Matrix. Sortie de buildkit. Closes #15 --- podman-matrix/ci_build-images.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/podman-matrix/ci_build-images.sh b/podman-matrix/ci_build-images.sh index e36e945..30fb248 100755 --- a/podman-matrix/ci_build-images.sh +++ b/podman-matrix/ci_build-images.sh @@ -9,23 +9,12 @@ ensure_not_root buildfolder=/tmp/synapse-$$ -buildkitd_version='latest' -buildkitd_args='--oci-worker-snapshotter=native' # needed as of v0.12.0 - if ! podman image exists ${synapse_image}:${synapse_version}; then mkdir ${buildfolder} && if curl -sSfL -- "https://github.com/matrix-org/synapse/archive/refs/tags/${synapse_version}.tar.gz" | \tar xz --strip-components 1 -C ${buildfolder}/ ; then - podman image pull docker.io/moby/buildkit:${buildkitd_version} - podman container run -d --name buildkitd --privileged docker.io/moby/buildkit:${buildkitd_version} ${buildkitd_args} && - podman container wait --condition=running buildkitd && - my_buildctl --addr=podman-container://buildkitd build \ - --frontend dockerfile.v0 \ - --local context=${buildfolder}/ \ - --local dockerfile=${buildfolder}/docker/ \ - --output type=oci,name=${synapse_image}:${synapse_version} | \ - podman image load || retval=false - podman container rm --volumes --force buildkitd && - podman image rm --force docker.io/moby/buildkit:${buildkitd_version} + rm -rf "${HOME}/buildah-cache-${UID}" + TMPDIR=${HOME} podman build -t ${synapse_image}:${synapse_version} -f ${buildfolder}/docker/Dockerfile ${buildfolder}/ && + podman image prune -f fi rm -rf ${buildfolder} eval "$retval"