[ARVADOS-DEV] updated: da4e48648d4c4b5f658634b16768e2ca2ede7ef5

git at public.curoverse.com git at public.curoverse.com
Wed Jul 22 08:31:41 EDT 2015


Summary of changes:
 jenkins/run_upload_packages.py | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

       via  da4e48648d4c4b5f658634b16768e2ca2ede7ef5 (commit)
      from  1b0a3c77ad14f01348c10390a5d81a4e20c8ad9f (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 da4e48648d4c4b5f658634b16768e2ca2ede7ef5
Author: Brett Smith <brett at curoverse.com>
Date:   Wed Jul 22 08:31:39 2015 -0400

    6497: More fixups to make things work in production.

diff --git a/jenkins/run_upload_packages.py b/jenkins/run_upload_packages.py
index ae3be48..3eac15b 100755
--- a/jenkins/run_upload_packages.py
+++ b/jenkins/run_upload_packages.py
@@ -63,8 +63,15 @@ class PackageSuite:
 class PythonPackageSuite(PackageSuite):
     LOGGER_PART = 'python'
 
+    def __init__(self, glob_root, rel_globs):
+        super().__init__(glob_root, rel_globs)
+        self.seen_packages = set()
+
     def upload_file(self, path):
         src_dir = os.path.dirname(os.path.dirname(path))
+        if src_dir in self.seen_packages:
+            return
+        self.seen_packages.add(src_dir)
         # NOTE: If we ever start uploading Python 3 packages, we'll need to
         # figure out some way to adapt cmd to match.  It might be easiest
         # to give all our setup.py files the executable bit, and run that
@@ -86,7 +93,16 @@ class GemPackageSuite(PackageSuite):
     LOGGER_PART = 'gems'
 
     def upload_file(self, path):
-        subprocess.check_call(['gem', 'push', path])
+        cmd = ['gem', 'push', path]
+        push_proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+        repushed = any(line == b'Repushing of gem versions is not allowed.\n'
+                       for line in push_proc.stdout)
+        # Read any remaining stdout before closing.
+        for line in push_proc.stdout:
+            pass
+        push_proc.stdout.close()
+        if (push_proc.wait() != 0) and not repushed:
+            raise subprocess.CalledProcessError(push_proc.returncode, cmd)
 
 
 class DistroPackageSuite(PackageSuite):
@@ -143,7 +159,7 @@ class RedHatPackageSuite(DistroPackageSuite):
     CREATEREPO_SCRIPT = """
 cd "$1"; shift
 REPODIR=$1; shift
-rpmsign --addsign "$@"
+rpmsign --addsign "$@" </dev/null
 mv "$@" "$REPODIR"
 createrepo "$REPODIR"
 """

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list