#!/bin/bash
+# vim: ts=4 sw=4 expandtab
set -ex
# create a release directory for ceph-build tools
# push binaries to chacra
find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source
find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}
- # extract cephadm
- rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
- echo cephadm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
+ # extract cephadm if it exists
+ if [[ -f ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm ]] ; then
+ rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
+ echo cephadm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
+ fi
# write json file with build info
cat > $WORKSPACE/repo-extra.json << EOF
{
#!/bin/bash
+# vim: ts=4 sw=4 expandtab
set -ex
# set to "true" or "false" so that both string comparisons
# push binaries to chacra
find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source/flavors/${FLAVOR}
find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
- # extract cephadm
- rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
+ # extract cephadm if it exists
+ if [[ -f ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm ]] ; then
+ rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
+ echo cephadm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
+ rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
+ fi
echo cephadm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
# write json file with build info
cat > $WORKSPACE/repo-extra.json << EOF
#!/bin/bash
+# vim: ts=4 sw=4 expandtab
set -ex
# push binaries to chacra
find release/${vers}/rpm/*/SRPMS | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/source/flavors/${FLAVOR}
find release/${vers}/rpm/*/RPMS/* | grep rpm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
- # extract cephadm
- rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
- echo cephadm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
+ # extract cephadm if it exists
+ if [[ -f ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm ]] ; then
+ rpm2cpio ${BUILDAREA}/RPMS/noarch/cephadm-*.rpm | cpio -i --to-stdout *sbin/cephadm > cephadm
+ echo cephadm | $VENV/chacractl binary ${chacra_flags} create ${chacra_endpoint}/${ARCH}/flavors/${FLAVOR}
+ fi
# write json file with build info
cat > $WORKSPACE/repo-extra.json << EOF
{
egrep -v "(Packages|Sources|Contents)" | \
$venv/chacractl binary ${chacra_flags} create ${chacra_endpoint}
- # extract cephadm binary and push
- dpkg-deb --fsys-tarfile release/${vers}/cephadm_${vers}*.deb | tar -x -f - --strip-components=3 ./usr/sbin/cephadm
- echo cephadm | $venv/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+ # extract cephadm if it exists
+ if [[ -f release/${vers}/cephadm_${vers}*.deb ]] ; then
+ dpkg-deb --fsys-tarfile release/${vers}/cephadm_${vers}*.deb | tar -x -f - --strip-components=3 ./usr/sbin/cephadm
+ echo cephadm | $venv/chacractl binary ${chacra_flags} create ${chacra_endpoint}
+ fi
# write json file with build info
cat > $WORKSPACE/repo-extra.json << EOF