From 59c54ab01ba6d8db997de17f3d3aa305d94d4fb9 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Mon, 21 Sep 2020 11:35:32 -0400 Subject: [PATCH] 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 --- ceph-ansible-nightly/build/build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-ansible-nightly/build/build b/ceph-ansible-nightly/build/build index 62346ff4..257b7580 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 -- 2.47.3