]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-nightly: use latest stable tag 1663/head
authorDimitri Savineau <dsavinea@redhat.com>
Mon, 21 Sep 2020 15:35:32 +0000 (11:35 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Mon, 21 Sep 2020 15:35:32 +0000 (11:35 -0400)
Currently the curl command is returning all tags matching the ceph
release so the variable contains multiple values.
We only need to have the latest one.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
ceph-ansible-nightly/build/build

index 62346ff4cda8381ac5086993a1a76242538ef785..257b7580f9b534dbb34135f8f02e63d1edeadbda 100644 (file)
@@ -23,7 +23,7 @@ function find_latest_tag {
   while response=$(curl -s "https://quay.ceph.io/api/v1/repository/ceph-ci/daemon/tag/?page=${page}&limit=${page_size}"); do
     tag=$(echo "${response}" | jq -r ".tags[] | select((.name | contains(\"stable\")) and (.name | contains(\"${release}-centos-${el}-x86_64\"))) | .name")
     if [ -n "${tag}" ]; then
-      echo "${tag}"
+      echo "${tag}" | head -n 1 | cut -d '"' -f 2
       return
     fi
     if [ $(echo "${response}" | jq -r .has_additional) == "false" ]; then