## Install any setup-time deps
# We need this for mk-build-deps
-sudo apt-get install equivs
+sudo apt-get install -y equivs
# Run the install-deps.sh upstream script if it exists
if [ -x install-deps.sh ]; then
echo "Ensuring dependencies are installed"
- ./install-deps.sh
+ sudo ./install-deps.sh
fi
## Install any setup-time deps (to make dist package)
# We need this to get the major version from lsb_release
-yum install -y redhat-lsb-core
+sudo yum install -y redhat-lsb-core mock
# Run the install-deps.sh upstream script if it exists
if [ -x install-deps.sh ]; then
echo "Ensuring dependencies are installed"
- ./install-deps.sh
+ sudo ./install-deps.sh
fi
## Install the build-time dependencies (for rpmbuild -bs)
-sudo yum-builddep -y dist/calamari.spec
+sudo yum-builddep -y dist/calamari-server.spec
## Create the source rpm
## Build the binaries with mock
echo "Building RPMs"
-sudo mock -r ${MOCK_TARGET}-${RELEASE}-${ARCH} --resultdir=./dist/rpm/"%(dist)s"/"%(target_arch)s"/ ${SRPM}
+sudo mock -r ${MOCK_TARGET}-${RELEASE}-${ARCH} --resultdir=./dist/rpm/ ${SRPM}
## Upload the created RPMs to chacra
[ "$FORCE" = true ] && chacra_flags="--force" || chacra_flags=""
# push binaries to chacra
-find ~/rpmbuild/ | egrep '\.rpm$' | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/
+find ./dist/rpm/ | egrep '\.rpm$' | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/$ARCH/
# start repo creation
$VENV/chacractl repo update ${chacra_endpoint}
- string:
name: DISTROS
description: "A list of distros to build for. Available options are: xenial, centos7, centos6, trusty, precise, wheezy, and jessie"
- default: "centos7 precise xenial"
+ default: "centos7 xenial"
- string:
name: ARCHS