[ARVADOS-DEV] updated: 846a9311a328b9cbadc8b70d34134b72b0b6b332

git at public.curoverse.com git at public.curoverse.com
Mon Jan 18 15:33:05 EST 2016


Summary of changes:
 jenkins/common-test-packages.sh                    | 28 ----------------
 jenkins/deb-common-test-packages.sh                | 25 ---------------
 .../.gitignore                                     |  0
 .../Makefile                                       |  0
 .../README                                         |  0
 .../build-all-build-containers.sh                  |  0
 .../centos6/Dockerfile                             |  8 ++---
 .../debian7/Dockerfile                             |  0
 .../debian8/Dockerfile                             |  0
 .../ubuntu1204/Dockerfile                          |  0
 .../ubuntu1404/Dockerfile                          |  0
 .../package-test-dockerfiles/centos6/Dockerfile    |  5 ++-
 jenkins/package-testing/common-test-packages.sh    | 28 ++++++++++++++++
 .../package-testing/deb-common-test-packages.sh    | 37 ++++++++++++++++++++++
 .../test-package-arvados-api-server.sh             | 20 ++++++++++++
 .../test-package-arvados-node-manager.sh           |  2 +-
 .../test-package-arvados-sso-server.sh             | 18 +++++------
 .../test-package-arvados-workbench.sh              | 20 ++++++++++++
 .../test-package-python27-python-arvados-fuse.sh   |  2 +-
 ...ackage-python27-python-arvados-python-client.sh |  2 +-
 .../{ => package-testing}/test-packages-centos6.sh |  4 +--
 .../{ => package-testing}/test-packages-debian7.sh |  0
 .../{ => package-testing}/test-packages-debian8.sh |  0
 .../test-packages-ubuntu1204.sh                    |  0
 .../test-packages-ubuntu1404.sh                    |  0
 jenkins/run-build-packages-all-targets.sh          | 13 ++++++++
 jenkins/run-build-packages-one-target.sh           | 28 ++++++++--------
 jenkins/run-build-packages-sso.sh                  |  2 +-
 jenkins/run-build-packages.sh                      |  1 +
 jenkins/run-library.sh                             |  3 +-
 jenkins/test-package-arvados-api-server.sh         |  6 ----
 jenkins/test-package-arvados-workbench.sh          |  6 ----
 32 files changed, 157 insertions(+), 101 deletions(-)
 delete mode 100755 jenkins/common-test-packages.sh
 delete mode 100755 jenkins/deb-common-test-packages.sh
 rename jenkins/{dockerfiles => package-build-dockerfiles}/.gitignore (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/Makefile (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/README (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/build-all-build-containers.sh (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/centos6/Dockerfile (88%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/debian7/Dockerfile (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/debian8/Dockerfile (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/ubuntu1204/Dockerfile (100%)
 rename jenkins/{dockerfiles => package-build-dockerfiles}/ubuntu1404/Dockerfile (100%)
 create mode 100755 jenkins/package-testing/common-test-packages.sh
 create mode 100755 jenkins/package-testing/deb-common-test-packages.sh
 create mode 100755 jenkins/package-testing/test-package-arvados-api-server.sh
 rename jenkins/{ => package-testing}/test-package-arvados-node-manager.sh (75%)
 rename jenkins/{ => package-testing}/test-package-arvados-sso-server.sh (87%)
 create mode 100755 jenkins/package-testing/test-package-arvados-workbench.sh
 rename jenkins/{ => package-testing}/test-package-python27-python-arvados-fuse.sh (55%)
 rename jenkins/{ => package-testing}/test-package-python27-python-arvados-python-client.sh (55%)
 rename jenkins/{ => package-testing}/test-packages-centos6.sh (86%)
 rename jenkins/{ => package-testing}/test-packages-debian7.sh (100%)
 rename jenkins/{ => package-testing}/test-packages-debian8.sh (100%)
 rename jenkins/{ => package-testing}/test-packages-ubuntu1204.sh (100%)
 rename jenkins/{ => package-testing}/test-packages-ubuntu1404.sh (100%)
 delete mode 100755 jenkins/test-package-arvados-api-server.sh
 delete mode 100755 jenkins/test-package-arvados-workbench.sh

       via  846a9311a328b9cbadc8b70d34134b72b0b6b332 (commit)
       via  f44f65a25c1d505e7faa9e26351525c10bb2cbbd (commit)
      from  a956a49875fc484c2c237aec228a92f8ce5b0f06 (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 846a9311a328b9cbadc8b70d34134b72b0b6b332
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jan 18 15:33:03 2016 -0500

    8080: fpm_depends comes before run-build-package commands; fpm_args comes after
    run-build package commands.  Improve quoting.  Use sed -i.

diff --git a/jenkins/package-build-dockerfiles/centos6/Dockerfile b/jenkins/package-build-dockerfiles/centos6/Dockerfile
index 51bad92..2bbec2e 100644
--- a/jenkins/package-build-dockerfiles/centos6/Dockerfile
+++ b/jenkins/package-build-dockerfiles/centos6/Dockerfile
@@ -23,8 +23,7 @@ RUN scl enable python33 "easy_install-3.3 pip" && scl enable python27 "easy_inst
 RUN cd /tmp && \
     curl -OL 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' && \
     rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm && \
-    cat /etc/yum.repos.d/rpmforge.repo | sed 's/enabled = 0/enabled = 1/' > /tmp/rpmforge.repo && \
-    mv /tmp/rpmforge.repo /etc/yum.repos.d
+    sed -i 's/enabled = 0/enabled = 1/' /etc/yum.repos.d/rpmforge.repo
 
 RUN touch /var/lib/rpm/* && yum install --assumeyes git
 
diff --git a/jenkins/package-test-dockerfiles/centos6/Dockerfile b/jenkins/package-test-dockerfiles/centos6/Dockerfile
index 95d8157..69927a1 100644
--- a/jenkins/package-test-dockerfiles/centos6/Dockerfile
+++ b/jenkins/package-test-dockerfiles/centos6/Dockerfile
@@ -15,7 +15,6 @@ RUN touch /var/lib/rpm/* && \
 RUN cd /tmp && \
     curl -OL 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' && \
     rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm && \
-    cat /etc/yum.repos.d/rpmforge.repo | sed 's/enabled = 0/enabled = 1/' > /tmp/rpmforge.repo && \
-    mv /tmp/rpmforge.repo /etc/yum.repos.d
+    sed -i 's/enabled = 0/enabled = 1/' /etc/yum.repos.d/rpmforge.repo
 
 COPY localrepo.repo /etc/yum.repos.d/localrepo.repo
\ No newline at end of file
diff --git a/jenkins/package-testing/deb-common-test-packages.sh b/jenkins/package-testing/deb-common-test-packages.sh
index 016ab5e..0d15436 100755
--- a/jenkins/package-testing/deb-common-test-packages.sh
+++ b/jenkins/package-testing/deb-common-test-packages.sh
@@ -8,15 +8,15 @@ target=$(echo $0 | sed 's/.*test-packages-\([^.]*\)\.sh.*/\1/')
 
 export ARV_PACKAGES_DIR=/arvados/packages/$target
 
-dpkg-query --show > $ARV_PACKAGES_DIR/$1.before
+dpkg-query --show > "$ARV_PACKAGES_DIR/$1.before"
 
 apt-get -qq update
 apt-get --assume-yes --force-yes install $1
 
-dpkg-query --show > $ARV_PACKAGES_DIR/$1.after
+dpkg-query --show > "$ARV_PACKAGES_DIR/$1.after"
 
 set +e
-diff $ARV_PACKAGES_DIR/$1.before $ARV_PACKAGES_DIR/$1.after > $ARV_PACKAGES_DIR/$1.diff
+diff "$ARV_PACKAGES_DIR/$1.before" "$ARV_PACKAGES_DIR/$1.after" > "$ARV_PACKAGES_DIR/$1.diff"
 set -e
 
 mkdir -p /tmp/opts
@@ -26,10 +26,12 @@ export ARV_PACKAGES_DIR=/arvados/packages/$target
 
 dpkg-deb -x $ARV_PACKAGES_DIR/"$1"_*.deb .
 
-for so in $(find . -name "*.so") ; do
+while read so && [ -n "$so" ]; do
     echo
     echo "== Packages dependencies for $so =="
-    ldd $so | awk '($3 ~ /^\//){print $3}' | sort -u | xargs dpkg -S | cut -d: -f1 | sort -u
-done
+    ldd "$so" | awk '($3 ~ /^\//){print $3}' | sort -u | xargs dpkg -S | cut -d: -f1 | sort -u
+done <<EOF
+$(find -name '*.so')
+EOF
 
 exec /jenkins/package-testing/common-test-packages.sh $1
diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh
index e9f75a4..30ba4cd 100755
--- a/jenkins/run-build-packages.sh
+++ b/jenkins/run-build-packages.sh
@@ -264,7 +264,7 @@ handle_python_package
 
 # arvados-src
 (
-    set -ex
+    set -e
 
     cd "$WORKSPACE"
     COMMIT_HASH=$(format_last_commit_here "%H")
diff --git a/jenkins/run-library.sh b/jenkins/run-library.sh
index dce75eb..3c62d7b 100755
--- a/jenkins/run-library.sh
+++ b/jenkins/run-library.sh
@@ -250,13 +250,14 @@ fpm_build () {
   for i in "${fpm_depends[@]}"; do
     COMMAND_ARR+=('--depends' "$i")
   done
-  COMMAND_ARR+=("${fpm_args[@]}")
 
   # Append remaining function arguments directly to fpm's command line.
   for i; do
     COMMAND_ARR+=("$i")
   done
 
+  COMMAND_ARR+=("${fpm_args[@]}")
+
   COMMAND_ARR+=("$PACKAGE")
 
   debug_echo -e "\n${COMMAND_ARR[@]}\n"

commit f44f65a25c1d505e7faa9e26351525c10bb2cbbd
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jan 18 14:43:01 2016 -0500

    8008: Move test files into their own directories.  Fix rails package tests to
    work with debian & ubuntu.  Fix error code checking.

diff --git a/jenkins/common-test-packages.sh b/jenkins/common-test-packages.sh
deleted file mode 100755
index 1ff8707..0000000
--- a/jenkins/common-test-packages.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-set -eu
-
-FAIL=0
-
-echo
-shared=$(find -name '*.so')
-if test -n "$shared" ; then
-    for so in $shared ; do
-        if ldd $so | grep "not found" ; then
-            echo "^^^ Missing while scanning $so ^^^"
-            FAIL=1
-        fi
-    done
-fi
-
-if test -x /jenkins/test-package-$1.sh ; then
-    if ! /jenkins/test-package-$1.sh ; then
-       FAIL=1
-    fi
-fi
-
-if test $FAIL = 0 ; then
-   echo "Package $1 passed"
-fi
-
-exit $FAIL
diff --git a/jenkins/dockerfiles/.gitignore b/jenkins/package-build-dockerfiles/.gitignore
similarity index 100%
rename from jenkins/dockerfiles/.gitignore
rename to jenkins/package-build-dockerfiles/.gitignore
diff --git a/jenkins/dockerfiles/Makefile b/jenkins/package-build-dockerfiles/Makefile
similarity index 100%
rename from jenkins/dockerfiles/Makefile
rename to jenkins/package-build-dockerfiles/Makefile
diff --git a/jenkins/dockerfiles/README b/jenkins/package-build-dockerfiles/README
similarity index 100%
rename from jenkins/dockerfiles/README
rename to jenkins/package-build-dockerfiles/README
diff --git a/jenkins/dockerfiles/build-all-build-containers.sh b/jenkins/package-build-dockerfiles/build-all-build-containers.sh
similarity index 100%
rename from jenkins/dockerfiles/build-all-build-containers.sh
rename to jenkins/package-build-dockerfiles/build-all-build-containers.sh
diff --git a/jenkins/dockerfiles/centos6/Dockerfile b/jenkins/package-build-dockerfiles/centos6/Dockerfile
similarity index 93%
rename from jenkins/dockerfiles/centos6/Dockerfile
rename to jenkins/package-build-dockerfiles/centos6/Dockerfile
index 68c1c74..51bad92 100644
--- a/jenkins/dockerfiles/centos6/Dockerfile
+++ b/jenkins/package-build-dockerfiles/centos6/Dockerfile
@@ -20,12 +20,13 @@ RUN gpg --keyserver pool.sks-keyservers.net --recv-keys D39DC0E3 && \
 RUN touch /var/lib/rpm/* && yum -q -y install python27 python33
 RUN scl enable python33 "easy_install-3.3 pip" && scl enable python27 "easy_install-2.7 pip"
 
-RUN cd / root && \
+RUN cd /tmp && \
     curl -OL 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' && \
     rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm && \
     cat /etc/yum.repos.d/rpmforge.repo | sed 's/enabled = 0/enabled = 1/' > /tmp/rpmforge.repo && \
-    mv /tmp/rpmforge.repo /etc/yum.repos.d && \
-    yum install --assumeyes git
+    mv /tmp/rpmforge.repo /etc/yum.repos.d
+
+RUN touch /var/lib/rpm/* && yum install --assumeyes git
 
 ENV WORKSPACE /arvados
 CMD ["scl", "enable", "python33", "python27", "/usr/local/rvm/bin/rvm-exec default bash /jenkins/run-build-packages.sh --target centos6"]
diff --git a/jenkins/dockerfiles/debian7/Dockerfile b/jenkins/package-build-dockerfiles/debian7/Dockerfile
similarity index 100%
rename from jenkins/dockerfiles/debian7/Dockerfile
rename to jenkins/package-build-dockerfiles/debian7/Dockerfile
diff --git a/jenkins/dockerfiles/debian8/Dockerfile b/jenkins/package-build-dockerfiles/debian8/Dockerfile
similarity index 100%
rename from jenkins/dockerfiles/debian8/Dockerfile
rename to jenkins/package-build-dockerfiles/debian8/Dockerfile
diff --git a/jenkins/dockerfiles/ubuntu1204/Dockerfile b/jenkins/package-build-dockerfiles/ubuntu1204/Dockerfile
similarity index 100%
rename from jenkins/dockerfiles/ubuntu1204/Dockerfile
rename to jenkins/package-build-dockerfiles/ubuntu1204/Dockerfile
diff --git a/jenkins/dockerfiles/ubuntu1404/Dockerfile b/jenkins/package-build-dockerfiles/ubuntu1404/Dockerfile
similarity index 100%
rename from jenkins/dockerfiles/ubuntu1404/Dockerfile
rename to jenkins/package-build-dockerfiles/ubuntu1404/Dockerfile
diff --git a/jenkins/package-test-dockerfiles/centos6/Dockerfile b/jenkins/package-test-dockerfiles/centos6/Dockerfile
index 5d610c0..95d8157 100644
--- a/jenkins/package-test-dockerfiles/centos6/Dockerfile
+++ b/jenkins/package-test-dockerfiles/centos6/Dockerfile
@@ -12,7 +12,7 @@ RUN touch /var/lib/rpm/* && \
     /usr/local/rvm/bin/rvm alias create default ruby-2.1 && \
     /usr/local/rvm/bin/rvm-exec default gem install bundle fpm
 
-RUN cd / root && \
+RUN cd /tmp && \
     curl -OL 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' && \
     rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm && \
     cat /etc/yum.repos.d/rpmforge.repo | sed 's/enabled = 0/enabled = 1/' > /tmp/rpmforge.repo && \
diff --git a/jenkins/package-testing/common-test-packages.sh b/jenkins/package-testing/common-test-packages.sh
new file mode 100755
index 0000000..2dc67ab
--- /dev/null
+++ b/jenkins/package-testing/common-test-packages.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -eu
+
+FAIL=0
+
+echo
+
+while read so && [ -n "$so" ]; do
+    if ldd "$so" | grep "not found" ; then
+        echo "^^^ Missing while scanning $so ^^^"
+        FAIL=1
+    fi
+done <<EOF
+$(find -name '*.so')
+EOF
+
+if test -x "/jenkins/package-testing/test-package-$1.sh" ; then
+    if ! "/jenkins/package-testing/test-package-$1.sh" ; then
+       FAIL=1
+    fi
+fi
+
+if test $FAIL = 0 ; then
+   echo "Package $1 passed"
+fi
+
+exit $FAIL
diff --git a/jenkins/deb-common-test-packages.sh b/jenkins/package-testing/deb-common-test-packages.sh
similarity index 65%
rename from jenkins/deb-common-test-packages.sh
rename to jenkins/package-testing/deb-common-test-packages.sh
index 1b52fc1..016ab5e 100755
--- a/jenkins/deb-common-test-packages.sh
+++ b/jenkins/package-testing/deb-common-test-packages.sh
@@ -6,9 +6,19 @@ set -eu
 # from the invocation path.
 target=$(echo $0 | sed 's/.*test-packages-\([^.]*\)\.sh.*/\1/')
 
+export ARV_PACKAGES_DIR=/arvados/packages/$target
+
+dpkg-query --show > $ARV_PACKAGES_DIR/$1.before
+
 apt-get -qq update
 apt-get --assume-yes --force-yes install $1
 
+dpkg-query --show > $ARV_PACKAGES_DIR/$1.after
+
+set +e
+diff $ARV_PACKAGES_DIR/$1.before $ARV_PACKAGES_DIR/$1.after > $ARV_PACKAGES_DIR/$1.diff
+set -e
+
 mkdir -p /tmp/opts
 cd /tmp/opts
 
@@ -22,4 +32,4 @@ for so in $(find . -name "*.so") ; do
     ldd $so | awk '($3 ~ /^\//){print $3}' | sort -u | xargs dpkg -S | cut -d: -f1 | sort -u
 done
 
-exec /jenkins/common-test-packages.sh $1
+exec /jenkins/package-testing/common-test-packages.sh $1
diff --git a/jenkins/package-testing/test-package-arvados-api-server.sh b/jenkins/package-testing/test-package-arvados-api-server.sh
new file mode 100755
index 0000000..64494aa
--- /dev/null
+++ b/jenkins/package-testing/test-package-arvados-api-server.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+cd /var/www/arvados-api/current/
+
+case "$TARGET" in
+    debian*|ubuntu*)
+        apt-get install -y nginx
+        dpkg-reconfigure arvados-api-server
+        ;;
+    centos6)
+        yum install --assumeyes httpd
+        yum reinstall --assumeyes arvados-api-server
+        ;;
+    *)
+        echo -e "$0: Unknown target '$TARGET'.\n" >&2
+        exit 1
+        ;;
+esac
+
+/usr/local/rvm/bin/rvm-exec default bundle list >$ARV_PACKAGES_DIR/arados-api-server.gems
diff --git a/jenkins/test-package-arvados-node-manager.sh b/jenkins/package-testing/test-package-arvados-node-manager.sh
similarity index 75%
rename from jenkins/test-package-arvados-node-manager.sh
rename to jenkins/package-testing/test-package-arvados-node-manager.sh
index c6760f8..2f416d1 100755
--- a/jenkins/test-package-arvados-node-manager.sh
+++ b/jenkins/package-testing/test-package-arvados-node-manager.sh
@@ -3,5 +3,5 @@ exec python <<EOF
 import libcloud.compute.types
 import libcloud.compute.providers
 libcloud.compute.providers.get_driver(libcloud.compute.types.Provider.AZURE_ARM)
-print "Successly imported compatible libcloud library"
+print "Successfully imported compatible libcloud library"
 EOF
diff --git a/jenkins/test-package-arvados-sso-server.sh b/jenkins/package-testing/test-package-arvados-sso-server.sh
similarity index 87%
rename from jenkins/test-package-arvados-sso-server.sh
rename to jenkins/package-testing/test-package-arvados-sso-server.sh
index 7f1221e..28c5618 100755
--- a/jenkins/test-package-arvados-sso-server.sh
+++ b/jenkins/package-testing/test-package-arvados-sso-server.sh
@@ -76,7 +76,7 @@ if [[ ! -e "/etc/arvados/sso/database.yml" ]]; then
   # We need to set up our database configuration now.
   if [[ "$FORMAT" == "rpm" ]]; then
     # postgres packaging on CentOS6 is kind of primitive, needs an initdb
-    $SUDO service postgresql initdb
+    service postgresql initdb
     if [ "$TARGET" = "centos6" ]; then
       sed -i -e "s/127.0.0.1\/32          ident/127.0.0.1\/32          md5/" /var/lib/pgsql/data/pg_hba.conf
       sed -i -e "s/::1\/128               ident/::1\/128               md5/" /var/lib/pgsql/data/pg_hba.conf
@@ -107,12 +107,12 @@ if [[ "$FORMAT" == "deb" ]]; then
   /usr/local/rvm/bin/rvm-exec default bundle list >$ARV_PACKAGES_DIR/arvados-sso-server.gems
 
   # Test 3: the package should remove cleanly
-  $SUDO apt-get remove arvados-sso-server --yes || EXITCODE=3
+  apt-get remove arvados-sso-server --yes || EXITCODE=3
 
   checkexit $EXITCODE "apt-get remove arvados-sso-server --yes"
 
   # Test 4: the package configuration should remove cleanly
-  $SUDO dpkg --purge arvados-sso-server || EXITCODE=4
+  dpkg --purge arvados-sso-server || EXITCODE=4
 
   checkexit $EXITCODE "dpkg --purge arvados-sso-server"
 
@@ -124,7 +124,7 @@ if [[ "$FORMAT" == "deb" ]]; then
 
   # Test 5: the package should remove cleanly with --purge
 
-  $SUDO apt-get remove arvados-sso-server --purge --yes || EXITCODE=5
+  apt-get remove arvados-sso-server --purge --yes || EXITCODE=5
 
   checkexit $EXITCODE "apt-get remove arvados-sso-server --purge --yes"
 
@@ -138,10 +138,10 @@ elif [[ "$FORMAT" == "rpm" ]]; then
 
   # Set up Nginx first
   # (courtesy of https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/el6/install_passenger.html)
-  $SUDO yum install -q -y epel-release pygpgme curl
-  $SUDO curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
-  $SUDO yum install -q -y nginx passenger
-  $SUDO sed -i -e 's/^# passenger/passenger/' /etc/nginx/conf.d/passenger.conf
+  yum install -q -y epel-release pygpgme curl
+  curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
+  yum install -q -y nginx passenger
+  sed -i -e 's/^# passenger/passenger/' /etc/nginx/conf.d/passenger.conf
   # Done setting up Nginx
 
   # Test 2: the package should reinstall cleanly
@@ -151,7 +151,7 @@ elif [[ "$FORMAT" == "rpm" ]]; then
   /usr/local/rvm/bin/rvm-exec default bundle list >$ARV_PACKAGES_DIR/arvados-sso-server.gems
 
   # Test 3: the package should remove cleanly
-  $SUDO yum -q -y remove arvados-sso-server || EXITCODE=3
+  yum -q -y remove arvados-sso-server || EXITCODE=3
 
   checkexit $EXITCODE "yum -q -y remove arvados-sso-server"
 
diff --git a/jenkins/package-testing/test-package-arvados-workbench.sh b/jenkins/package-testing/test-package-arvados-workbench.sh
new file mode 100755
index 0000000..e255786
--- /dev/null
+++ b/jenkins/package-testing/test-package-arvados-workbench.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+cd /var/www/arvados-workbench/current/
+
+case "$TARGET" in
+    debian*|ubuntu*)
+        apt-get install -y nginx
+        dpkg-reconfigure arvados-workbench
+        ;;
+    centos6)
+        yum install --assumeyes httpd
+        yum reinstall --assumeyes arvados-workbench
+        ;;
+    *)
+        echo -e "$0: Unknown target '$TARGET'.\n" >&2
+        exit 1
+        ;;
+esac
+
+/usr/local/rvm/bin/rvm-exec default bundle list >$ARV_PACKAGES_DIR/arvados-workbench.gems
diff --git a/jenkins/test-package-python27-python-arvados-fuse.sh b/jenkins/package-testing/test-package-python27-python-arvados-fuse.sh
similarity index 55%
rename from jenkins/test-package-python27-python-arvados-fuse.sh
rename to jenkins/package-testing/test-package-python27-python-arvados-fuse.sh
index d2a1072..1654be9 100755
--- a/jenkins/test-package-python27-python-arvados-fuse.sh
+++ b/jenkins/package-testing/test-package-python27-python-arvados-fuse.sh
@@ -2,5 +2,5 @@
 
 exec python <<EOF
 import arvados_fuse
-print "Successly imported arvados_fuse"
+print "Successfully imported arvados_fuse"
 EOF
diff --git a/jenkins/test-package-python27-python-arvados-python-client.sh b/jenkins/package-testing/test-package-python27-python-arvados-python-client.sh
similarity index 55%
rename from jenkins/test-package-python27-python-arvados-python-client.sh
rename to jenkins/package-testing/test-package-python27-python-arvados-python-client.sh
index c5abddd..0772fbf 100755
--- a/jenkins/test-package-python27-python-arvados-python-client.sh
+++ b/jenkins/package-testing/test-package-python27-python-arvados-python-client.sh
@@ -2,5 +2,5 @@
 
 exec python <<EOF
 import arvados
-print "Successly imported arvados"
+print "Successfully imported arvados"
 EOF
diff --git a/jenkins/test-packages-centos6.sh b/jenkins/package-testing/test-packages-centos6.sh
similarity index 86%
rename from jenkins/test-packages-centos6.sh
rename to jenkins/package-testing/test-packages-centos6.sh
index 29ad987..ad80564 100755
--- a/jenkins/test-packages-centos6.sh
+++ b/jenkins/package-testing/test-packages-centos6.sh
@@ -38,7 +38,7 @@ if test -n "$shared" ; then
 fi
 
 if test -n "$SCL" ; then
-    exec $SCL "/jenkins/common-test-packages.sh $1"
+    exec $SCL "/jenkins/package-testing/common-test-packages.sh $1"
 else
-    exec /jenkins/common-test-packages.sh $1
+    exec /jenkins/package-testing/common-test-packages.sh $1
 fi
diff --git a/jenkins/test-packages-debian7.sh b/jenkins/package-testing/test-packages-debian7.sh
similarity index 100%
rename from jenkins/test-packages-debian7.sh
rename to jenkins/package-testing/test-packages-debian7.sh
diff --git a/jenkins/test-packages-debian8.sh b/jenkins/package-testing/test-packages-debian8.sh
similarity index 100%
rename from jenkins/test-packages-debian8.sh
rename to jenkins/package-testing/test-packages-debian8.sh
diff --git a/jenkins/test-packages-ubuntu1204.sh b/jenkins/package-testing/test-packages-ubuntu1204.sh
similarity index 100%
rename from jenkins/test-packages-ubuntu1204.sh
rename to jenkins/package-testing/test-packages-ubuntu1204.sh
diff --git a/jenkins/test-packages-ubuntu1404.sh b/jenkins/package-testing/test-packages-ubuntu1404.sh
similarity index 100%
rename from jenkins/test-packages-ubuntu1404.sh
rename to jenkins/package-testing/test-packages-ubuntu1404.sh
diff --git a/jenkins/run-build-packages-all-targets.sh b/jenkins/run-build-packages-all-targets.sh
index 5cd5e74..64c1262 100755
--- a/jenkins/run-build-packages-all-targets.sh
+++ b/jenkins/run-build-packages-all-targets.sh
@@ -81,6 +81,19 @@ done
 
 cd $(dirname $0)
 
+FINAL_EXITCODE=0
+
 for dockerfile_path in $(find -name Dockerfile); do
     ./run-build-packages-one-target.sh --target "$(basename $(dirname "$dockerfile_path"))" --command "$COMMAND" $DEBUG $TEST_PACKAGES $ONLY_TEST
+
+    CODE=$?
+    if test $CODE != 0 ; then
+        FINAL_EXITCODE=$CODE
+    fi
 done
+
+if test $FINAL_EXITCODE != 0 ; then
+    echo "Build packages failed with code $FINAL_EXITCODE" >&2
+fi
+
+exit $FINAL_EXITCODE
diff --git a/jenkins/run-build-packages-one-target.sh b/jenkins/run-build-packages-one-target.sh
index 0233de1..ebfc0be 100755
--- a/jenkins/run-build-packages-one-target.sh
+++ b/jenkins/run-build-packages-one-target.sh
@@ -96,7 +96,7 @@ if [[ -n "$test_packages" ]]; then
         )
     fi
 
-    COMMAND="/jenkins/test-packages-$TARGET.sh"
+    COMMAND="/jenkins/package-testing/test-packages-$TARGET.sh"
     IMAGE="arvados/package-test:$TARGET"
 else
     IMAGE="arvados/build:$TARGET"
@@ -110,7 +110,7 @@ JENKINS_DIR=$(dirname "$(readlink -e "$0")")
 if [[ -n "$test_packages" ]]; then
     pushd "$JENKINS_DIR/package-test-dockerfiles"
 else
-    pushd "$JENKINS_DIR/dockerfiles"
+    pushd "$JENKINS_DIR/package-build-dockerfiles"
 fi
 
 echo $TARGET
@@ -148,35 +148,37 @@ fi
 FINAL_EXITCODE=0
 
 package_fails=""
-set -x
 
+set +e
 if [[ -n "$test_packages" ]]; then
     for p in $packages ; do
-        set +e
         docker run --rm -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
                --env ARVADOS_DEBUG=1 \
                --env "TARGET=$TARGET" \
                --env "WORKSPACE=/arvados" \
                "$IMAGE" $COMMAND $p
-        if test $? != 0 ; then
-            FINAL_EXITCODE=$?
+        CODE=$?
+        if test $CODE != 0 ; then
+            FINAL_EXITCODE=$CODE
             package_fails="$package_fails $p"
-            echo "ERROR: $tag build failed with exit status $FINAL_EXITCODE." >&2
+            echo "ERROR: $tag test failed with exit status $FINAL_EXITCODE." >&2
         fi
     done
 else
-    if docker run --rm -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
-              --env ARVADOS_DEBUG=1 "$IMAGE" $COMMAND; then
-        # Success - nothing more to do.
-        true
+    docker run --rm -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
+           --env ARVADOS_DEBUG=1 "$IMAGE" $COMMAND
+    CODE=$?
+    if test $CODE = 0 ; then
+        echo
+        echo "Build packages for $TARGET succeeded." >&2
     else
-        FINAL_EXITCODE=$?
+        FINAL_EXITCODE=$CODE
         echo "ERROR: $tag build failed with exit status $FINAL_EXITCODE." >&2
     fi
 fi
 
 if test -n "$package_fails" ; then
-    echo "Failed package tests:$package_fails"
+    echo "Failed package tests:$package_fails" >&2
 fi
 
 exit $FINAL_EXITCODE
diff --git a/jenkins/run-build-packages-sso.sh b/jenkins/run-build-packages-sso.sh
index 6324066..cc673a6 100755
--- a/jenkins/run-build-packages-sso.sh
+++ b/jenkins/run-build-packages-sso.sh
@@ -149,7 +149,7 @@ umask 0022
 debug_echo "umask is" `umask`
 
 if [[ ! -d "$WORKSPACE/packages/$TARGET" ]]; then
-    mkdir -p $WORKSPACE/packages/$TARGET
+    mkdir -p "$WORKSPACE/packages/$TARGET"
 fi
 
 # Build the SSO server package
diff --git a/jenkins/run-build-packages.sh b/jenkins/run-build-packages.sh
index 445b3a0..e9f75a4 100755
--- a/jenkins/run-build-packages.sh
+++ b/jenkins/run-build-packages.sh
@@ -264,7 +264,7 @@ handle_python_package
 
 # arvados-src
 (
-    set -e
+    set -ex
 
     cd "$WORKSPACE"
     COMMIT_HASH=$(format_last_commit_here "%H")
@@ -285,6 +285,7 @@ handle_python_package
     fpm_build $SRC_BUILD_DIR/=/usr/local/arvados/src arvados-src 'Curoverse, Inc.' 'dir' "$PKG_VERSION" "--exclude=usr/local/arvados/src/.git" "--url=https://arvados.org" "--license=GNU Affero General Public License, version 3.0" "--description=The Arvados source code" "--architecture=all"
 
     rm -rf "$SRC_BUILD_DIR"
+    echo $?
 )
 
 # Go binaries
diff --git a/jenkins/test-package-arvados-api-server.sh b/jenkins/test-package-arvados-api-server.sh
deleted file mode 100755
index 467872b..0000000
--- a/jenkins/test-package-arvados-api-server.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -e
-cd /var/www/arvados-api/current/
-yum install --assumeyes httpd
-yum reinstall --assumeyes arvados-api-server
-/usr/local/rvm/bin/rvm-exec default bundle list >$ARV_PACKAGES_DIR/arados-api-server.gems
diff --git a/jenkins/test-package-arvados-workbench.sh b/jenkins/test-package-arvados-workbench.sh
deleted file mode 100755
index 7111b94..0000000
--- a/jenkins/test-package-arvados-workbench.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-set -e
-cd /var/www/arvados-workbench/current/
-yum install --assumeyes httpd
-yum reinstall --assumeyes arvados-workbench
-/usr/local/rvm/bin/rvm-exec default bundle list >$ARV_PACKAGES_DIR/arvados-workbench.gems

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list