]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commit
ceph-ansible-nightly: fix find for latest stable tag 985/head
authorSébastien Han <seb@redhat.com>
Fri, 16 Mar 2018 01:47:35 +0000 (02:47 +0100)
committerSébastien Han <seb@redhat.com>
Fri, 16 Mar 2018 01:54:28 +0000 (02:54 +0100)
commit0cc5fcbcb49d86516bcc78168fa52811738c94f2
treef47cbba1756a427b75c9247b687e84a26e21b641
parentdf19d98d62d0e4b27c8bde48d37d2c9a10fd538b
ceph-ansible-nightly: fix find for latest stable tag

Docker Hub API when queried only returns the 10 first tags. This is
annoying but we have to:

* count the number of pages
* query all the tag from each page
* build a variable with all the tags
* transform this variable in an array
* sort the array
* pick the last element of the array which corresponds to the latest
stable tag

I could have done that with a loop (for luminous and jewel) but assigned
variable in array's name is a nigthmare in bash so I ended up doing
twice the same thing...

This is not elegant but it works.

Signed-off-by: Sébastien Han <seb@redhat.com>
ceph-ansible-nightly/build/build