Build and deploy packages for every commit for debian/ubuntu/raspbian
This commit is contained in:
parent
766a59884d
commit
d4a8c96ede
|
@ -294,80 +294,67 @@ checksanity
|
|||
# We don't want to build packages for all supported distros after every commit
|
||||
# Only build all packages when executed via cron
|
||||
# See https://docs.travis-ci.com/user/cron-jobs/
|
||||
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ] || [ "${DIST}" == "buster" ] ; then
|
||||
|
||||
# Steps common to Redhat distros
|
||||
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
|
||||
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${TRAVIS}" != "true" ]; then
|
||||
commonprep
|
||||
echo "Begin Redhat build..."
|
||||
|
||||
# Steps common to Redhat distros
|
||||
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
|
||||
echo "Begin Redhat build..."
|
||||
setrpmpkgname
|
||||
|
||||
setrpmpkgname
|
||||
ln -sfT distros/redhat rpm
|
||||
|
||||
ln -sfT distros/redhat rpm
|
||||
# The rpm specfile requires the Crud submodule folder to be empty
|
||||
rm -rf web/api/app/Plugin/Crud
|
||||
mkdir web/api/app/Plugin/Crud
|
||||
|
||||
# The rpm specfile requires the Crud submodule folder to be empty
|
||||
rm -rf web/api/app/Plugin/Crud
|
||||
mkdir web/api/app/Plugin/Crud
|
||||
|
||||
reporpm="rpmfusion-free-release"
|
||||
dlurl="https://download1.rpmfusion.org/free/${OS}/${reporpm}-${DIST}.noarch.rpm"
|
||||
|
||||
# Give our downloaded repo rpm a common name so redhat_package.mk can find it
|
||||
if [ -n "$dlurl" ] && [ $? -eq 0 ]; then
|
||||
echo "Retrieving ${reporpm} repo rpm..."
|
||||
curl $dlurl > build/external-repo.noarch.rpm
|
||||
else
|
||||
echo "ERROR: Failed to retrieve ${reporpm} repo rpm..."
|
||||
echo "Download url was: $dlurl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
setrpmchangelog
|
||||
|
||||
echo "Starting packpack..."
|
||||
execpackpack
|
||||
|
||||
# Steps common to Debian based distros
|
||||
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then
|
||||
echo "Begin ${OS} ${DIST} build..."
|
||||
|
||||
setdebpkgname
|
||||
movecrud
|
||||
|
||||
if [ "${DIST}" == "trusty" ] || [ "${DIST}" == "precise" ]; then
|
||||
ln -sfT distros/ubuntu1204 debian
|
||||
elif [ "${DIST}" == "wheezy" ]; then
|
||||
ln -sfT distros/debian debian
|
||||
else
|
||||
ln -sfT distros/ubuntu1604 debian
|
||||
fi
|
||||
|
||||
setdebchangelog
|
||||
|
||||
echo "Starting packpack..."
|
||||
execpackpack
|
||||
reporpm="rpmfusion-free-release"
|
||||
dlurl="https://download1.rpmfusion.org/free/${OS}/${reporpm}-${DIST}.noarch.rpm"
|
||||
|
||||
# Give our downloaded repo rpm a common name so redhat_package.mk can find it
|
||||
if [ -n "$dlurl" ] && [ $? -eq 0 ]; then
|
||||
echo "Retrieving ${reporpm} repo rpm..."
|
||||
curl $dlurl > build/external-repo.noarch.rpm
|
||||
else
|
||||
echo "ERROR: Failed to retrieve ${reporpm} repo rpm..."
|
||||
echo "Download url was: $dlurl"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We were not triggered via cron so just build and test trusty
|
||||
elif [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ] && [ "${ARCH}" == "x86_64" ]; then
|
||||
echo "Begin Ubuntu Trusty build..."
|
||||
|
||||
commonprep
|
||||
setdebpkgname
|
||||
movecrud
|
||||
|
||||
ln -sfT distros/ubuntu1204 debian
|
||||
|
||||
setdebchangelog
|
||||
setrpmchangelog
|
||||
|
||||
echo "Starting packpack..."
|
||||
execpackpack
|
||||
fi;
|
||||
# Steps common to Debian based distros
|
||||
elif [ "${OS}" == "debian" ] || [ "${OS}" == "ubuntu" ] || [ "${OS}" == "raspbian" ]; then
|
||||
commonprep
|
||||
echo "Begin ${OS} ${DIST} build..."
|
||||
|
||||
setdebpkgname
|
||||
movecrud
|
||||
|
||||
if [ "${DIST}" == "trusty" ] || [ "${DIST}" == "precise" ]; then
|
||||
ln -sfT distros/ubuntu1204 debian
|
||||
elif [ "${DIST}" == "wheezy" ]; then
|
||||
ln -sfT distros/debian debian
|
||||
else
|
||||
ln -sfT distros/ubuntu1604 debian
|
||||
fi
|
||||
|
||||
setdebchangelog
|
||||
|
||||
echo "Starting packpack..."
|
||||
execpackpack
|
||||
|
||||
# We were not triggered via cron so just build and test trusty
|
||||
if [ "${OS}" == "ubuntu" ] && [ "${DIST}" == "trusty" ] && [ "${ARCH}" == "x86_64" ]; then
|
||||
# If we are running inside Travis then attempt to install the deb we just built
|
||||
if [ "${TRAVIS}" == "true" ]; then
|
||||
install_deb
|
||||
install_deb
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue