From fd8fb44a105bb4412a9e1639f8bd04913f5bffe7 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 27 Mar 2020 09:29:09 -0400 Subject: [PATCH] ceph-ansible-nightly: parametrize centos release Since octopus the container image are based on CentOS 8 instead of 7 for the previous Ceph releases. The current regex to find the latest stable container image per Ceph releases is hardcoding 7. Signed-off-by: Dimitri Savineau --- ceph-ansible-nightly/build/build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ceph-ansible-nightly/build/build b/ceph-ansible-nightly/build/build index 818763a25..7730db8da 100644 --- a/ceph-ansible-nightly/build/build +++ b/ceph-ansible-nightly/build/build @@ -25,8 +25,12 @@ function count_tag_pages { function find_latest_tag { release="$1" + el="7" + if [ "${release}" == "octopus" ]; then + el="8" + fi for page in $(seq 1 $total_pages); do - tag=$(curl -s "https://registry.hub.docker.com/v2/repositories/ceph/daemon/tags/?page=$page&page_size=${page_size}" | jq ".\"results\"[] | select((.name | contains(\"stable\")) and (.name | contains(\"${release}-centos-7-x86_64\"))) | .name") + tag=$(curl -s "https://registry.hub.docker.com/v2/repositories/ceph/daemon/tags/?page=$page&page_size=${page_size}" | jq ".\"results\"[] | select((.name | contains(\"stable\")) and (.name | contains(\"${release}-centos-${el}-x86_64\"))) | .name") if [ -n "$tag" ]; then echo "$tag" | head -n 1 | cut -d '"' -f 2 return -- 2.47.3