]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-nightly: parametrize centos release 1537/head
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 27 Mar 2020 13:29:09 +0000 (09:29 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Fri, 27 Mar 2020 13:29:09 +0000 (09:29 -0400)
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 <dsavinea@redhat.com>
ceph-ansible-nightly/build/build

index 818763a25d2a87bd57cbd47094968f8594ba289b..7730db8da032d11799f02fed613947ea47f76f9d 100644 (file)
@@ -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