VRFS-951 Pushing only develop or master branch files as debians
This commit is contained in:
parent
18d8ff8d3f
commit
d8cb2c72c4
|
|
@ -9,17 +9,21 @@ if [ "$?" = "0" ]; then
|
|||
echo "build succeeded"
|
||||
|
||||
if [ ! -z "$PACKAGE" ]; then
|
||||
echo "publishing ubuntu package (.deb)"
|
||||
DEBPATH=`find target/deb -name *.deb`
|
||||
DEBNAME=`basename $DEBPATH`
|
||||
if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* ]]; then
|
||||
echo "publishing ubuntu package (.deb)"
|
||||
DEBPATH=`find target/deb -name *.deb`
|
||||
DEBNAME=`basename $DEBPATH`
|
||||
|
||||
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
|
||||
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "deb publish failed"
|
||||
exit 1
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "deb publish failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "done publishing deb"
|
||||
else
|
||||
echo "Skipping publish since branch is neither master or develop..."
|
||||
fi
|
||||
echo "done publishing deb"
|
||||
fi
|
||||
else
|
||||
echo "build failed"
|
||||
|
|
|
|||
57
db/jenkins
57
db/jenkins
|
|
@ -7,38 +7,39 @@ echo "starting build..."
|
|||
./build
|
||||
|
||||
if [ "$?" = "0" ]; then
|
||||
echo "build succeeded"
|
||||
echo "publishing gem"
|
||||
pushd "target/ruby_package"
|
||||
find . -name *.gem -exec curl -f -T {} $GEM_SERVER/{} \;
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "publish failed"
|
||||
exit 1
|
||||
fi
|
||||
popd
|
||||
echo "done publishing gems"
|
||||
echo "build succeeded"
|
||||
if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* ]]; then
|
||||
echo "publishing gem"
|
||||
pushd "target/ruby_package"
|
||||
find . -name *.gem -exec curl -f -T {} $GEM_SERVER/{} \;
|
||||
|
||||
if [ ! -z "$PACKAGE" ]; then
|
||||
echo "publishing ubuntu packages (.deb)"
|
||||
for f in `find target -name '*.deb'`; do
|
||||
DEBNAME=`basename $f`
|
||||
DEBPATH="$f"
|
||||
echo "publishing $DEBPATH to deb server"
|
||||
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "deb publish failed of $DEBPATH"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "publish failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "done publishing debs"
|
||||
popd
|
||||
echo "done publishing gems"
|
||||
|
||||
if [ ! -z "$PACKAGE" ]; then
|
||||
echo "publishing ubuntu packages (.deb)"
|
||||
for f in `find target -name '*.deb'`; do
|
||||
DEBNAME=`basename $f`
|
||||
DEBPATH="$f"
|
||||
echo "publishing $DEBPATH to deb server"
|
||||
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "deb publish failed of $DEBPATH"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
echo "done publishing debs"
|
||||
fi
|
||||
else
|
||||
echo "Skipping publish since branch is neither master or develop..."
|
||||
fi
|
||||
|
||||
else
|
||||
echo "build failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
20
web/jenkins
20
web/jenkins
|
|
@ -9,17 +9,21 @@ if [ "$?" = "0" ]; then
|
|||
echo "build succeeded"
|
||||
|
||||
if [ ! -z "$PACKAGE" ]; then
|
||||
echo "publishing ubuntu package (.deb)"
|
||||
DEBPATH=`find target/deb -name *.deb`
|
||||
DEBNAME=`basename $DEBPATH`
|
||||
if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* ]]; then
|
||||
echo "publishing ubuntu package (.deb)"
|
||||
DEBPATH=`find target/deb -name *.deb`
|
||||
DEBNAME=`basename $DEBPATH`
|
||||
|
||||
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
|
||||
curl -f -T $DEBPATH $DEB_SERVER/$DEBNAME
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "deb publish failed"
|
||||
exit 1
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "deb publish failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "done publishing deb"
|
||||
else
|
||||
echo "Skipping publish since branch is neither master or develop..."
|
||||
fi
|
||||
echo "done publishing deb"
|
||||
fi
|
||||
else
|
||||
echo "build failed"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ echo "starting build..."
|
|||
if [ "$?" = "0" ]; then
|
||||
echo "build succeeded"
|
||||
|
||||
if [[ "$GIT_BRANCH" == *develop* || "$GIT_BRANCH" == *master* ]]; then
|
||||
|
||||
# generate gem version based on jenkins build number
|
||||
if [ -z $BUILD_NUMBER ]; then
|
||||
BUILD_NUMBER="1"
|
||||
|
|
@ -20,14 +22,14 @@ module JamWebsockets
|
|||
VERSION = "$VERSION"
|
||||
end
|
||||
EOF
|
||||
|
||||
|
||||
gem build jam_websockets.gemspec
|
||||
|
||||
GEMNAME="jam_websockets-${VERSION}.gem"
|
||||
|
||||
echo "publishing gem"
|
||||
curl -f -T $GEMNAME $GEM_SERVER/$GEMNAME
|
||||
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "gem publish failed"
|
||||
exit 1
|
||||
|
|
@ -47,8 +49,10 @@ EOF
|
|||
fi
|
||||
echo "done publishing deb"
|
||||
|
||||
|
||||
fi
|
||||
else
|
||||
echo "Skipping publish since branch is neither master or develop..."
|
||||
fi
|
||||
else
|
||||
echo "build failed"
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue