[ARVADOS-DEV] updated: 2b93735fc87e447301afafe6556d8571afef2bcf
git at public.curoverse.com
git at public.curoverse.com
Fri Jun 12 16:48:00 EDT 2015
Summary of changes:
jenkins/run-build-packages.sh | 86 ++++++++++++++++++++++++++++---------------
1 file changed, 57 insertions(+), 29 deletions(-)
via 2b93735fc87e447301afafe6556d8571afef2bcf (commit)
via 6f1a22656665643dbba71e59099171d69554b2ad (commit)
from c06542419737cddd5adda84d4b14e0b88912d0f7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2b93735fc87e447301afafe6556d8571afef2bcf
Author: Ward Vandewege <ward at curoverse.com>
Date: Fri Jun 12 14:49:30 2015 -0400
Do not build and upload gems that already exist on rubygems.
No issue #
diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh
index 8ad5649..e6a89b4 100755
--- a/jenkins/run-build-packages.sh
+++ b/jenkins/run-build-packages.sh
@@ -316,41 +316,61 @@ fi
cd "$WORKSPACE"
cd sdk/ruby
-# clean up old packages
-find -maxdepth 1 \( -name 'arvados-*.gem' -or -name 'rubygem-arvados_*.deb' \) \
- -delete
-if [[ "$DEBUG" != 0 ]]; then
- gem build arvados.gemspec
-else
- # -q appears to be broken in gem version 2.2.2
- gem build arvados.gemspec -q >/dev/null 2>&1
-fi
+ARVADOS_GEM_EPOCH=`git log -n1 --first-parent --format=%ct`
+ARVADOS_GEM_DATE=`date --utc --date="@${ARVADOS_GEM_EPOCH}" +%Y%m%d%H%M%S`
+ARVADOS_GEM_VERSION="0.1.${ARVADOS_GEM_DATE}"
-if [[ "$UPLOAD" != 0 ]]; then
- # publish new gem
- gem push arvados-*gem
-fi
+# see if this gem needs building/uploading
+gem search arvados -r -a |grep -q $ARVADOS_GEM_VERSION
-build_and_scp_deb arvados-*.gem "" "Curoverse, Inc." gem "" \
- --prefix "$FPM_GEM_PREFIX"
+if [[ "$?" != "0" ]]; then
+ # clean up old packages
+ find -maxdepth 1 \( -name 'arvados-*.gem' -or -name 'rubygem-arvados_*.deb' -or -name 'rubygem-arvados_*.rpm' \) \
+ -delete
+ if [[ "$DEBUG" != 0 ]]; then
+ gem build arvados.gemspec
+ else
+ # -q appears to be broken in gem version 2.2.2
+ gem build arvados.gemspec -q >/dev/null 2>&1
+ fi
+
+ if [[ "$UPLOAD" != 0 ]]; then
+ # publish new gem
+ gem push arvados-*gem
+ fi
+
+ build_and_scp_deb arvados-*.gem "" "Curoverse, Inc." gem "" \
+ --prefix "$FPM_GEM_PREFIX"
+fi
+
# Build arvados-cli GEM
cd "$WORKSPACE"
cd sdk/cli
-# clean up old gems
-rm -f arvados-cli*gem
-if [[ "$DEBUG" != 0 ]]; then
- gem build arvados-cli.gemspec
-else
- # -q appears to be broken in gem version 2.2.2
- gem build arvados-cli.gemspec -q >/dev/null
-fi
+ARVADOS_CLI_GEM_EPOCH=`git log -n1 --first-parent --format=%ct`
+ARVADOS_CLI_GEM_DATE=`date --utc --date="@${ARVADOS_CLI_GEM_EPOCH}" +%Y%m%d%H%M%S`
+ARVADOS_CLI_GEM_VERSION="0.1.${ARVADOS_CLI_GEM_DATE}"
+
+# see if this gem needs building/uploading
+gem search arvados-cli -r -a |grep -q $ARVADOS_GEM_VERSION
-if [[ "$UPLOAD" != 0 ]]; then
- # publish new gem
- gem push arvados-cli*gem
+if [[ "$?" != "0" ]]; then
+ # clean up old gems
+ rm -f arvados-cli*gem
+
+ if [[ "$DEBUG" != 0 ]]; then
+ gem build arvados-cli.gemspec
+ else
+ # -q appears to be broken in gem version 2.2.2
+ gem build arvados-cli.gemspec -q >/dev/null
+ fi
+
+ if [[ "$UPLOAD" != 0 ]]; then
+ # publish new gem
+ gem push arvados-cli*gem
+ fi
fi
# Python packages
commit 6f1a22656665643dbba71e59099171d69554b2ad
Author: Ward Vandewege <ward at curoverse.com>
Date: Fri Jun 12 11:07:44 2015 -0400
Add very rudimentary support for pushing the rpm packages into a yum
repository.
No issue #
diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh
index f7f74e9..8ad5649 100755
--- a/jenkins/run-build-packages.sh
+++ b/jenkins/run-build-packages.sh
@@ -240,10 +240,14 @@ verify_and_scp_deb () {
else
if [[ ! $FPM_RESULTS =~ "File already exists" ]]; then
if [[ "$FPM_EXIT_CODE" != "0" ]]; then
- echo "Error building debian package for $1:\n $FPM_RESULTS"
+ echo "Error building package for $1:\n $FPM_RESULTS"
else
if [[ "$UPLOAD" != 0 ]]; then
- scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
+ if [[ "$FORMAT" == 'deb' ]]; then
+ scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:tmp/
+ else
+ scp -P2222 $FPM_PACKAGE_NAME $APTUSER@$APTSERVER:rpm/
+ fi
CALL_FREIGHT=1
fi
fi
@@ -647,7 +651,11 @@ verify_and_scp_deb $FPM_EXIT_CODE $FPM_RESULTS
# Finally, publish the packages, if necessary
if [[ "$UPLOAD" != 0 && "$CALL_FREIGHT" != 0 ]]; then
- ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
+ if [[ "$FORMAT" == 'deb' ]]; then
+ ssh -p2222 $APTUSER@$APTSERVER -t "cd tmp && ls -laF *deb && freight add *deb apt/wheezy && freight cache && rm -f *deb"
+ else
+ ssh -p2222 $APTUSER@$APTSERVER -t "cd rpm && ls -laF *rpm && mv *rpm /var/www/rpm.arvados.org/CentOS/6/os/x86_64/ && createrepo /var/www/rpm.arvados.org/CentOS/6/os/x86_64/"
+ fi
else
if [[ "$UPLOAD" != 0 ]]; then
echo "No new packages generated. No freight run necessary."
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list