From: Dimitri Savineau Date: Fri, 27 Mar 2020 13:29:09 +0000 (-0400) Subject: ceph-ansible-nightly: parametrize centos release X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1537%2Fhead;p=ceph-build.git 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 --- 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