From: Dimitri Savineau Date: Mon, 21 Sep 2020 15:35:32 +0000 (-0400) Subject: ceph-ansible-nightly: use latest stable tag X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1663%2Fhead;p=ceph-build.git ceph-ansible-nightly: use latest stable tag 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 --- diff --git a/ceph-ansible-nightly/build/build b/ceph-ansible-nightly/build/build index 62346ff4c..257b7580f 100644 --- a/ceph-ansible-nightly/build/build +++ b/ceph-ansible-nightly/build/build @@ -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