From: Alfredo Deza Date: Mon, 30 Nov 2015 20:40:00 +0000 (-0500) Subject: remove the build scripts from the parent ceph-deploy job X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb054cbead8bafbdb425bce14a21664ec11735a3;p=ceph-build.git remove the build scripts from the parent ceph-deploy job Signed-off-by: Alfredo Deza --- diff --git a/ceph-deploy/build/build b/ceph-deploy/build/build deleted file mode 100644 index c8eb82dc..00000000 --- a/ceph-deploy/build/build +++ /dev/null @@ -1,128 +0,0 @@ -#!/bin/bash - -# This is the script that runs inside Jenkins. -# http://jenkins.ceph.com/job/ceph-deploy/ - -set -x -set -e - -HOST=$(hostname --short) -echo "Building on ${HOST}" -echo " DIST=${DIST}" -echo " BPTAG=${BPTAG}" -echo " WS=$WORKSPACE" -echo " PWD=$(pwd)" -echo " BRANCH=$BRANCH" - -# FIXME A very naive way to just list the RPM $DIST that we currently support. -# We should be a bit more lenient to allow any rhel/centos/sles/suse -rpm_dists="rhel centos6 centos7 centos" -deb_dists="precise wheezy squeeze trusty jessie" - -VENV="$WORKSPACE/venv/bin" - -# A helper to match an item in a list of items, like python's `if item in list` -listcontains() { - for word in $2; do - [[ $word = $1 ]] && return 0 - done - return 1 -} - -if listcontains $DIST "$rpm_dists" -then - # Tag tree and update version number in change log and - # in setup.py before building. - - # this exists in scripts/build_utils.sh - get_rpm_dist - - REPO=rpm-repo - BUILDAREA=./rpmbuild - DIST=el6 - RPM_BUILD=$(lsb_release -s -c) - - [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH" - chacra_endpoint="ceph-deploy/${chacra_ref}/${DISTRO}/${DISTRO_VERSION}" - - # this exists in scripts/build_utils.sh - check_binary_existence $chacra_endpoint/$ARCH - - if [ ! -e setup.py ] ; then - echo "Are we in the right directory" - exit 1 - fi - - # Create Tarball - python setup.py sdist --formats=bztar - - # Build RPM - mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} - BUILDAREA=`readlink -fn ${BUILDAREA}` ### rpm wants absolute path - cp ceph-deploy.spec ${BUILDAREA}/SPECS - cp dist/*.tar.bz2 ${BUILDAREA}/SOURCES - echo "buildarea is: ${BUILDAREA}" - rpmbuild -ba --define "_topdir ${BUILDAREA}" --define "_unpackaged_files_terminate_build 0" ${BUILDAREA}/SPECS/ceph-deploy.spec - - [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags="" - - find ${BUILDAREA}/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source - find ${BUILDAREA}/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH} - - exit 0 - -elif listcontains $DIST "$deb_dists" -then - - # Tag tree and update version number in change log and - # in setup.py before building. - - REPO=debian-repo - COMPONENT=main - DEB_DIST="sid wheezy squeeze jessie precise raring trusty" - DEB_BUILD=$(lsb_release -s -c) - #XXX only releases until we fix this - RELEASE=1 - DISTRO=`python -c "exec 'import platform; print platform.linux_distribution()[0].lower()'"` - - [ "$TEST" = true ] && chacra_ref="test" || chacra_ref="$BRANCH" - chacra_endpoint="ceph-deploy/${chacra_ref}/${DISTRO}/${DEB_BUILD}/${ARCH}" - - # this exists in scripts/build_utils.sh - check_binary_existence $chacra_endpoint - - if [ ! -d debian ] ; then - echo "Are we in the right directory" - exit 1 - fi - - # Apply backport tag if release build - if [ $RELEASE -eq 1 ] ; then - DEB_VERSION=$(dpkg-parsechangelog | sed -rne 's,^Version: (.*),\1, p') - BP_VERSION=${DEB_VERSION}${BPTAG} - dch -D $DIST --force-distribution -b -v "$BP_VERSION" "$comment" - dpkg-source -b . - fi - - # Build Package - echo "Building for dist: $DEB_BUILD" - # we no longer sign the .dsc or .changes files (done by default with - # the `-k$KEYID` flag), so explicitly tell the tool not to sign them - dpkg-buildpackage -uc -us - if [ $? -ne 0 ] ; then - echo "Build failed" - exit 2 - fi - - [ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags="" - - # push binaries to chacra - # the binaries are created in one directory up from $WORKSPACE - find ../ | egrep "*\.(changes|deb|dsc|gz)$" | egrep -v "(Packages|Sources|Contents)" | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint} - - echo "Done" - -else - echo "Can't determine build host type, I suck. Sorry." - exit 4 -fi diff --git a/ceph-deploy/build/setup b/ceph-deploy/build/setup deleted file mode 100644 index 87e1aa00..00000000 --- a/ceph-deploy/build/setup +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -# This is the script that runs inside Jenkins. -# http://jenkins.ceph.com/job/ceph-deploy/ - -set -x -set -e - -# ensure dependencies are installed for RPM hosts, because they are required and -# we are not building with a contained environment like we do on DEB builds - -# TODO: use Mock to build ceph-deploy rpm's and avoid this - -rpm_deps="python-devel python-virtualenv python-mock python-tox pytest" - -if test -f /etc/redhat-release ; then - sudo yum install -y $rpm_deps -fi - -pkgs=( "chacractl>=0.0.4" ) -install_python_packages "pkgs[@]" - -# create the .chacractl config file using global variables -make_chacractl_config