Skip to content

Commit

Permalink
[jump_ci] toolbox: jump_ci_prepare_topsail: tasks/main: fix don't pru…
Browse files Browse the repository at this point in the history
…ne `preserve=true` images (#644)

…
  • Loading branch information
kpouget authored Jan 21, 2025
2 parents 7b7be81 + de43830 commit 7a521a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 7a521a2

Please sign in to comment.