From 61307e2f5f4419b6f953a5b5debca54987eacc08 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Tue, 27 Oct 2015 12:10:22 -0500 Subject: [PATCH] add a FORCE flag to the ceph-next job When FORCE is checked binaries will be built and pushed to chacra even if they already exist in chacra Signed-off-by: Andrew Schoen --- ceph-build-next/build/build_deb | 2 +- ceph-build-next/build/build_rpm | 3 +-- ceph-next/config/definitions/ceph-next.yml | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ceph-build-next/build/build_deb b/ceph-build-next/build/build_deb index ff83d13e..916fedf1 100644 --- a/ceph-build-next/build/build_deb +++ b/ceph-build-next/build/build_deb @@ -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 diff --git a/ceph-build-next/build/build_rpm b/ceph-build-next/build/build_rpm index adf0d5a3..6cce50a5 100644 --- a/ceph-build-next/build/build_rpm +++ b/ceph-build-next/build/build_rpm @@ -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}" diff --git a/ceph-next/config/definitions/ceph-next.yml b/ceph-next/config/definitions/ceph-next.yml index 39eee278..f32d8135 100644 --- a/ceph-next/config/definitions/ceph-next.yml +++ b/ceph-next/config/definitions/ceph-next.yml @@ -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' -- 2.39.5