From de4383041f55f512306e925d76a2cc9159d8a041 Mon Sep 17 00:00:00 2001 From: Kevin Pouget Date: Tue, 21 Jan 2025 10:05:15 +0100 Subject: [PATCH] [jump_ci] toolbox: jump_ci_prepare_topsail: tasks/main: fix don't prune preserve=true images --- .../jump_ci/toolbox/jump_ci_prepare_topsail/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/jump_ci/toolbox/jump_ci_prepare_topsail/tasks/main.yml b/projects/jump_ci/toolbox/jump_ci_prepare_topsail/tasks/main.yml index bcc62b51a..cea95e9e9 100644 --- a/projects/jump_ci/toolbox/jump_ci_prepare_topsail/tasks/main.yml +++ b/projects/jump_ci/toolbox/jump_ci_prepare_topsail/tasks/main.yml @@ -123,14 +123,14 @@ failed_when: false - name: List all the old images to delete + # setting --filter label=preserve!=true in Podman args doesn't work shell: set -o pipefail; podman image ls --filter until=4h --filter label=name=topsail - --filter 'label=preserve!=true' --format json - | jq -r '.[] | select(.Containers == 0) | .Id' + | jq -r '.[] | select(.Containers == 0) | select(.Labels.preserve != "true") | .Id' register: podman_images_to_delete_cmd # To add the 'preserve=true' label: