]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-source-dist: Deepen clone as necessary 2448/head
authorZack Cerza <zack@cerza.org>
Tue, 23 Sep 2025 00:07:09 +0000 (18:07 -0600)
committerZack Cerza <zack@cerza.org>
Tue, 23 Sep 2025 00:07:09 +0000 (18:07 -0600)
We do a shallow clone, but I have seen a few branches that fail because the
clone is _too_ shallow. In rare cases like this we can simply deepen until we
find the tag.

Signed-off-by: Zack Cerza <zack@cerza.org>
ceph-source-dist/build/Jenkinsfile

index 98106411c5cf75fea7b96a9a3378e575534759a4..7b9e8b3820725c8d3446d1de98ec169b9ac4532f 100644 (file)
@@ -51,9 +51,14 @@ pipeline {
       steps {
         script {
           dir("ceph") {
+            sh '''#!/bin/bash
+              while [ -z "$(git describe --abbrev=8 --match 'v*' | sed s/^v//)" ]; do
+                git fetch --deepen 50
+              done
+            '''
             def ceph_version_git = sh(
-                  script: "git describe --abbrev=8 --match 'v*' | sed s/^v//",
-                  returnStdout: true,
+              script: "git describe --abbrev=8 --match 'v*' | sed s/^v//",
+              returnStdout: true,
             ).trim()
             sh """
               mkdir dist