Skip to content

Commit

Permalink
Separated out package cloud push from build
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelycode committed Dec 5, 2016
1 parent e6d7dd5 commit 096387e
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 21 deletions.
22 changes: 2 additions & 20 deletions utils/buddy_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export armBINDIR=$SOURCEBINPATH/build/arm/tyk.linux.arm64-$VERSION
export i386TGZDIR=$SOURCEBINPATH/build/i386/tgz/tyk.linux.i386-$VERSION
export amd64TGZDIR=$SOURCEBINPATH/build/amd64/tgz/tyk.linux.amd64-$VERSION
export armTGZDIR=$SOURCEBINPATH/build/arm/tgz/tyk.linux.arm64-$VERSION
export PACKAGECLOUDREPO=tyk-gateway-auto
export PACKAGECLOUDREPO=$PC_TARGET

orgDir=/src/github.com/TykTechnologies
cliDIR=/src/github.com/TykTechnologies/tyk-cli
Expand Down Expand Up @@ -131,12 +131,6 @@ AMDRPMNAME="tyk-gateway-"$VERSION"-1.x86_64.rpm"
echo "Signing AMD RPM"
~/build_tools/rpm-sign.exp $amd64TGZDIR/$AMDRPMNAME

package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/precise $AMDDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/trusty $AMDDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/debian/jessie $AMDDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/6 $AMDRPMNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/7 $AMDRPMNAME

echo Creating Deb Package for i386
cd $i386TGZDIR/
fpm -n tyk-gateway -v $VERSION --after-install $amd64TGZDIR/install/post_install.sh --after-remove $amd64TGZDIR/install/post_remove.sh -a i386 -s dir -t deb ./=/opt/tyk-gateway
Expand All @@ -148,12 +142,6 @@ i386RPMNAME="tyk-gateway-"$VERSION"-1.i386.rpm"
echo "Signing i386 RPM"
~/build_tools/rpm-sign.exp $i386TGZDIR/$i386RPMNAME

package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/precise $i386DEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/trusty $i386DEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/debian/jessie $i386DEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/6 $i386RPMNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/7 $i386RPMNAME

echo Creating Deb Package for ARM
cd $armTGZDIR/
fpm -n tyk-gateway -v $VERSION --after-install $amd64TGZDIR/install/post_install.sh --after-remove $amd64TGZDIR/install/post_remove.sh -a arm64 -s dir -t deb ./=/opt/tyk-gateway
Expand All @@ -163,10 +151,4 @@ ARMDEBNAME="tyk-gateway_"$VERSION"_arm64.deb"
ARMRPMNAME="tyk-gateway-"$VERSION"-1.arm64.rpm"

echo "Signing Arm RPM"
~/build_tools/rpm-sign.exp $armTGZDIR/$ARMRPMNAME

package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/precise $ARMDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/trusty $ARMDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/debian/jessie $ARMDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/6 $ARMRPMNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/7 $ARMRPMNAME
~/build_tools/rpm-sign.exp $armTGZDIR/$ARMRPMNAME
49 changes: 49 additions & 0 deletions utils/buddy_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash
export VERSION=$(perl -n -e'/v(\d+).(\d+).(\d+).(\d+)/'' && print "$1\.$2\.$3\.$4"' version.go)

export SOURCEBIN=tyk
export CLIBIN=tyk-cli
export SOURCEBINPATH=/src/github.com/TykTechnologies/tyk
export i386BINDIR=$SOURCEBINPATH/build/i386/tyk.linux.i386-$VERSION
export amd64BINDIR=$SOURCEBINPATH/build/amd64/tyk.linux.amd64-$VERSION
export armBINDIR=$SOURCEBINPATH/build/arm/tyk.linux.arm64-$VERSION

export i386TGZDIR=$SOURCEBINPATH/build/i386/tgz/tyk.linux.i386-$VERSION
export amd64TGZDIR=$SOURCEBINPATH/build/amd64/tgz/tyk.linux.amd64-$VERSION
export armTGZDIR=$SOURCEBINPATH/build/arm/tgz/tyk.linux.arm64-$VERSION
export PACKAGECLOUDREPO=$PC_TARGET

echo Pushing Deb Package for amd64
cd $amd64TGZDIR/
AMDDEBNAME="tyk-gateway_"$VERSION"_amd64.deb"
AMDRPMNAME="tyk-gateway-"$VERSION"-1.x86_64.rpm"

package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/precise $AMDDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/trusty $AMDDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/debian/jessie $AMDDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/6 $AMDRPMNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/7 $AMDRPMNAME

echo Pushing Deb Package for i386
cd $i386TGZDIR/

i386DEBNAME="tyk-gateway_"$VERSION"_i386.deb"
i386RPMNAME="tyk-gateway-"$VERSION"-1.i386.rpm"

package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/precise $i386DEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/trusty $i386DEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/debian/jessie $i386DEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/6 $i386RPMNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/7 $i386RPMNAME

echo Pushing Deb Package for ARM
cd $armTGZDIR/

ARMDEBNAME="tyk-gateway_"$VERSION"_arm64.deb"
ARMRPMNAME="tyk-gateway-"$VERSION"-1.arm64.rpm"

package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/precise $ARMDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/ubuntu/trusty $ARMDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/debian/jessie $ARMDEBNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/6 $ARMRPMNAME
package_cloud push tyk/$PACKAGECLOUDREPO/el/7 $ARMRPMNAME
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package main
var VERSION string = "v2.3.0.30"
var VERSION string = "v2.3.0.31"

0 comments on commit 096387e

Please sign in to comment.