Skip to content

Commit

Permalink
Build script
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudOver committed Mar 28, 2018
1 parent 77bc6d4 commit df45f20
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ FLAVORS=( deb rpm tar sh )
PACKAGES=( corecluster corecluster-algorithm-id-uuid corecluster-algorithm-node-fillup corecluster-algorithm-node-median corecluster-algorithm-storage-default corecluster-auth-db corecluster-storage-libvirt corecluster-storage-sheepdog corecluster-storage-ssh coredhcp coremetry corenetwork corenode coretalk corevpn )
BUILDDIR=/data/build/

DEB_VERSIONS=( stretch xenial yakkety zasty artful )

for NAME in "${PACKAGES[@]}" ; do
rm -rf $BUILDDIR/build-repo-$NAME
git clone https://github.com/cloudover/$NAME $BUILDDIR/build-repo-$NAME
Expand Down Expand Up @@ -35,13 +37,21 @@ for NAME in "${PACKAGES[@]}" ; do
--config-files /etc/$NAME \
-C $BUILDDIR/build-$NAME .
mv $NAME*.$FLAVOR $BUILDDIR/packages/$VERSION/$FLAVOR/$NAME-$VERSION.$FLAVOR
#aptly repo add cloudover $BUILDDIR/packages/$VERSION/$FLAVOR/$NAME-$VERSION.$FLAVOR

aptly repo add cloudover $BUILDDIR/packages/$VERSION/$FLAVOR/$NAME-$VERSION.$FLAVOR
done

cd $BUILDDIR/packages/$VERSION/deb/
dpkg-scanpackages . | gzip > $BUILDDIR/packages/$VERSION/deb/Packages.gz
# dpkg-scanpackages . | gzip > $BUILDDIR/packages/$VERSION/deb/Packages.gz
cd $pwd
done

aptly snapshot create $VERSION from cloudover
for DISTRO in "${DEB_VERSIONS[@]}" ; do
aptly publish snapshot -distribution $DISTRO -architectures=all $VERSION
aptly publish switch -distribution $DISTRO -architectures=all $VERSION
done

if ! [ "x$1" == "x" ] ; then
rsync -av $BUILDDIR/packages/$VERSION $1
rsync -av ~/.aptly/public/ $1
fi

0 comments on commit df45f20

Please sign in to comment.