]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-tag: Fix condition for RCs 2534/head
authorDavid Galloway <david.galloway@ibm.com>
Tue, 3 Feb 2026 19:10:44 +0000 (14:10 -0500)
committerDavid Galloway <david.galloway@ibm.com>
Tue, 3 Feb 2026 19:10:44 +0000 (14:10 -0500)
Signed-off-by: David Galloway <david.galloway@ibm.com>
ansible/roles/ceph-release/tasks/create.yml

index e70af80a9bfb2edbb02eda355a9537a7b0c1f9a0..4cb963e2118e931544f8499f87a304c860a357b2 100644 (file)
     - "release != 'SECURITY'"
     - tag|bool is true
 
+# If the previous tag exists, just reuse it.  Otherwise with the head commit in ceph-releases.git.
+- name: check for previously existing tag for re-build
+  command: git ls-remote --tags releases "refs/tags/v{{ version }}"
+  args:
+    chdir: ceph
+  when:
+    - "release != 'SECURITY'"
+    - tag|bool is false
+  register: previous_tag_exists
+  changed_when: false
+  failed_when: false
+
 - name: "git checkout previously existing tag for re-build"
   command: git checkout -f v{{ version }}
   args:
@@ -47,6 +59,8 @@
   when:
     - "release != 'SECURITY'"
     - tag|bool is false
+    - previous_tag_exists is defined
+    - previous_tag_exists.stdout | length > 0
 
 # SECURITY
 - name: "git checkout security {{ branch }}-release branch"