]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
add a FORCE flag to the ceph-next job
authorAndrew Schoen <aschoen@redhat.com>
Tue, 27 Oct 2015 17:10:22 +0000 (12:10 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 27 Oct 2015 17:10:22 +0000 (12:10 -0500)
When FORCE is checked binaries will be built and pushed to chacra even
if they already exist in chacra

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-build-next/build/build_deb
ceph-build-next/build/build_rpm
ceph-next/config/definitions/ceph-next.yml

index ff83d13e74770a6d1c0a6108b4c8795baddb2dbd..916fedf16508243bdd962d2618ccf823ed7bb963 100644 (file)
@@ -14,7 +14,7 @@ chacra_endpoint="ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}"
 chacractl binary exists ${chacra_endpoint}
 
 # if the binary already exists in chacra, do not rebuild
-if [ $? -e 0 ] ; then
+if [ $? -e 0 ] && [ "$FORCE" = false ] ; then
     echo "The endpoint at ${chacra_endpoint} already exists, Exiting..."
     exit 0
 fi
index adf0d5a3d8c543061bd8208611f638bf95a1a9f5..6cce50a597a57785fc62dd0db4c8b5f0349e240f 100644 (file)
@@ -61,12 +61,11 @@ chacra_baseurl="ceph/${chacra_ref}/${DISTRO}/${RELEASE}"
 chacractl binary exists ${chacra_baseurl}/${ARCH}
 
 # if the binary already exists in chacra, do not rebuild
-if [ $? -e 0 ] ; then
+if [ $? -e 0 ] && [ "$FORCE" = false ]; then
     echo "The endpoint at ${chacra_baseurl}/${ARCH} already exists, Exiting..."
     exit 0
 fi
 
-
 HOST=$(hostname --short)
 echo "Building on $(hostname) Date: $(date)"
 echo "  DIST=${DIST}"
index 39eee278d3f32de680200bdb884201345806f120..f32d8135b4a2fec29332b4f74e6a982bb8f8b391 100644 (file)
@@ -30,6 +30,13 @@ If this is unchecked, then the builds will be pushed to chacra with the correct
 
 If this is checked, then the builds will be pushed to chacra under the 'test' ref."
 
+      - bool:
+          name: FORCE
+          description: "
+If this is unchecked, then then nothing is built or pushed if they already exist in chacra. This is the default.
+
+If this is checked, then the binaries will be built and pushed to chacra even if they already exist in chacra."
+
     builders:
       - multijob:
           name: 'ceph setup phase'