]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
nfs-ganesha: trigger builds from ceph-dev-build 654/head
authorAli Maredia <amaredia@redhat.com>
Tue, 7 Mar 2017 20:51:55 +0000 (15:51 -0500)
committerAli Maredia <amaredia@redhat.com>
Wed, 8 Mar 2017 19:14:59 +0000 (14:14 -0500)
Poll shaman repo url every 30 seconds for 10
minutes to ensure binaries are in shaman

Signed-off-by: Ali Maredia <amaredia@redhat.com>
ceph-dev-build/config/definitions/ceph-dev-build.yml
nfs-ganesha/build/build_deb
nfs-ganesha/build/build_rpm
nfs-ganesha/config/definitions/nfs-ganesha.yml

index 8b3b3d82199a73662b05a54e26077541066f3fcf..660aefe5459b2bb628846c65ed2c8fe0b19a3767 100644 (file)
             - ../../../scripts/build_utils.sh
             - ../../build/setup_rpm
             - ../../build/build_rpm
+      - trigger-builds:
+        - project: "nfs-ganesha"
+          current-parameters: True
+          predefined-parameters:
+            CEPH_BRANCH=$BRANCH
 
     publishers:
       - postbuildscript:
index b2f00b5a0bcd2db8421082085c88d48e53256bf1..cde9a613d0e99152c2f8c57420bde50ca0d62623 100644 (file)
@@ -7,10 +7,24 @@ if test "$DISTRO" != "debian" -a "$DISTRO" != "ubuntu"; then
 fi
 
 REPO_URL="https://shaman.ceph.com/api/repos/ceph/$CEPH_BRANCH/$CEPH_SHA1/$DISTRO/$DIST/repo"
-SHAMAN_MIRROR=`curl --fail -L ${REPO_URL}`
-if [[ ${SHAMAN_MIRROR} ]]; then
-  echo "Ceph debian lib repo exists in shaman"
-else
+TIME_LIMIT=600
+INTERVAL=30
+REPO_FOUND=0
+
+# poll shaman for up to 10 minutes
+while [ "$SECONDS" -le "$TIME_LIMIT" ]
+do
+  SHAMAN_MIRROR=`curl --fail -L ${REPO_URL}`
+  if [[ ${SHAMAN_MIRROR} ]]; then
+    echo "Ceph debian lib repo exists in shaman"
+    REPO_FOUND=1
+    break
+  else
+    sleep $INTERVAL
+  fi
+done
+
+if [[ "$REPO_FOUND" -eq 0 ]]; then
   echo "Ceph debian lib repo does NOT exist in shaman"
   exit 1
 fi
index fd48515ab02334bd1f5bdab85ae150a167b6e638..44f078b613bdc1cc34a5739fc194c32bfe376d3b 100644 (file)
@@ -11,10 +11,24 @@ RELEASE="$(lsb_release --short -r | cut -d '.' -f 1)" # sytem release
 
 # Get .repo file from appropriate shaman build
 REPO_URL="https://shaman.ceph.com/api/repos/ceph/$CEPH_BRANCH/$CEPH_SHA1/$DISTRO/$RELEASE/flavors/default/repo"
-if `curl --fail -L $REPO_URL > $WORKSPACE/shaman.repo`; then
-  echo "Ceph repo file has been added from shaman"
-else
-  echo "Ceph repo file was NOT added from shaman"
+TIME_LIMIT=600
+INTERVAL=30
+REPO_FOUND=0
+
+# poll shaman for up to 10 minutes
+while [ "$SECONDS" -le "$TIME_LIMIT" ]
+do
+  if `curl --fail -L $REPO_URL > $WORKSPACE/shaman.repo`; then
+    echo "Ceph repo file has been added from shaman"
+    REPO_FOUND=1
+    break
+  else
+    sleep $INTERVAL
+  fi
+done
+
+if [[ "$REPO_FOUND" -eq 0 ]]; then
+  echo "Ceph lib repo does NOT exist in shaman"
   exit 1
 fi
 
index 6a314a9531bd181b403116c0a9086ba04189e7f1..aaa6ada18dc165fe677a4a552e37fc6b0d2bde1c 100644 (file)
@@ -111,21 +111,6 @@ If this is checked, then the binaries will be built and pushed to chacra even if
             - ARCHS
     triggers:
       - github
-      - pollurl:
-          cron: '*/30 * * * *'
-          urls:
-            - url: https://shaman.ceph.com/api/repos/ceph/master/latest/centos/7/repo
-              check-content:
-                - simple: true
-            - url: https://shaman.ceph.com/api/repos/ceph/kraken/latest/centos/7/repo
-              check-content:
-                - simple: true
-            - url: https://shaman.ceph.com/api/repos/ceph/master/latest/ubuntu/xenial/repo
-              check-content:
-                - simple: true
-            - url: https://shaman.ceph.com/api/repos/ceph/kraken/latest/ubuntu/xenial/repo
-              check-content:
-                - simple: true
 
     scm:
       - nfs-ganesha