X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/9bd113ee357bbbe904d69c232957c74595e2ad98..1ff88838f9ca6a912411fb6bf3df217e1bcdcbe9:/jenkins/run_upload_packages.py diff --git a/jenkins/run_upload_packages.py b/jenkins/run_upload_packages.py index 38abd89..0ef609e 100755 --- a/jenkins/run_upload_packages.py +++ b/jenkins/run_upload_packages.py @@ -38,8 +38,12 @@ def run_and_grep(cmd, read_output, *regexps, popen_kwargs[read_output] = subprocess.PIPE proc = subprocess.Popen(cmd, **popen_kwargs) with open(getattr(proc, read_output).fileno(), encoding=encoding) as output: - matched_lines = [line for line in output - if any(regexp.search(line) for regexp in regexps)] + matched_lines = [] + for line in output: + if any(regexp.search(line) for regexp in regexps): + matched_lines.append(line) + if read_output == 'stderr': + print(line, file=sys.stderr, end='') return proc.wait(), matched_lines @@ -94,8 +98,14 @@ class PackageSuite: class PythonPackageSuite(PackageSuite): LOGGER_PART = 'python' - REUPLOAD_REGEXP = re.compile( - r'^error: Upload failed \(400\): A file named "[^"]+" already exists\b') + REUPLOAD_REGEXPS = [ + re.compile( + r'^error: Upload failed \(400\): A file named "[^"]+" already exists\b'), + re.compile( + r'^error: Upload failed \(400\): File already exists\b'), + re.compile( + r'^error: Upload failed \(400\): Only one sdist may be uploaded per release\b'), + ] def __init__(self, glob_root, rel_globs): super().__init__(glob_root, rel_globs) @@ -120,7 +130,7 @@ class PythonPackageSuite(PackageSuite): cmd.append('--quiet') cmd.extend(['sdist', '--dist-dir', '.upload_dist', 'upload']) upload_returncode, repushed = run_and_grep( - cmd, 'stderr', self.REUPLOAD_REGEXP, cwd=src_dir) + cmd, 'stderr', *self.REUPLOAD_REGEXPS, cwd=src_dir) if (upload_returncode != 0) and not repushed: raise subprocess.CalledProcessError(upload_returncode, cmd) shutil.rmtree(os.path.join(src_dir, '.upload_dist')) @@ -185,10 +195,12 @@ freight cache "apt/$DISTNAME" rm "$@" """ TARGET_DISTNAMES = { - 'debian8': 'jessie', - 'ubuntu1204': 'precise', - 'ubuntu1404': 'trusty', - 'ubuntu1604': 'xenial', + 'debian8': 'jessie-dev', + 'debian9': 'stretch-dev', + 'debian10': 'buster-dev', + 'ubuntu1404': 'trusty-dev', + 'ubuntu1604': 'xenial-dev', + 'ubuntu1804': 'bionic-dev', } def post_uploads(self, paths): @@ -207,7 +219,7 @@ createrepo "$REPODIR" """ REPO_ROOT = '/var/www/rpm.arvados.org/' TARGET_REPODIRS = { - 'centos7': 'CentOS/7/os/x86_64/', + 'centos7': 'CentOS/7/dev/x86_64/', } def post_uploads(self, paths): @@ -234,7 +246,7 @@ PACKAGE_SUITES = { 'services/login-sync/*.gem', ), } -for target in ['debian8', 'ubuntu1204', 'ubuntu1404', 'ubuntu1604']: +for target in ['debian8', 'debian9', 'debian10', 'ubuntu1404', 'ubuntu1604', 'ubuntu1804']: PACKAGE_SUITES[target] = _define_suite( DebianPackageSuite, os.path.join('packages', target, '*.deb'), target=target)