X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/0d66112d0a33cbdce8b7bee3ca0897fdf7462ab1..e172b06c0080c34b8d110675bda710011567de17:/jenkins/run_upload_packages.py diff --git a/jenkins/run_upload_packages.py b/jenkins/run_upload_packages.py index 8a31d2e..c6949e8 100755 --- a/jenkins/run_upload_packages.py +++ b/jenkins/run_upload_packages.py @@ -56,7 +56,7 @@ class TimestampFile: try: os.makedirs(p) except OSError as exc: - if exc.errno == errno.EEXIST and os.path.isdir(path): + if exc.errno == errno.EEXIST and os.path.isdir(p): pass else: raise @@ -69,9 +69,18 @@ class TimestampFile: return -1 def update(self): - os.close(os.open(self.path, os.O_CREAT | os.O_APPEND)) - os.utime(self.path, (time.time(), self.start_time)) - + try: + os.close(os.open(self.path, os.O_CREAT | os.O_APPEND)) + os.utime(self.path, (time.time(), self.start_time)) + except: + # when the packages directory is created/populated by a build in a + # docker container, as root, the script that runs the upload + # doesn't always have permission to touch a timestamp file there. + # In production, we build/upload from ephemeral machines, which + # means that the timestamp mechanism is not used. We print a + # warning and move on without erroring out. + print("Warning: unable to update timestamp file",self.path,"permission problem?") + pass class PackageSuite: NEED_SSH = False @@ -216,13 +225,12 @@ aptly publish update "$DISTNAME" filesystem:"${DISTNAME%-*}": def __init__(self, glob_root, rel_globs, target, ssh_host, ssh_opts, repo): super().__init__(glob_root, rel_globs, target, ssh_host, ssh_opts) self.TARGET_DISTNAMES = { - 'debian8': 'jessie-'+repo, - 'debian9': 'stretch-'+repo, 'debian10': 'buster-'+repo, - 'ubuntu1404': 'trusty-'+repo, - 'ubuntu1604': 'xenial-'+repo, + 'debian11': 'bullseye-'+repo, + 'debian12': 'bookworm-'+repo, 'ubuntu1804': 'bionic-'+repo, 'ubuntu2004': 'focal-'+repo, + 'ubuntu2204': 'jammy-'+repo, } def post_uploads(self, paths): @@ -237,7 +245,7 @@ cd "$1"; shift REPODIR=$1; shift rpmsign --addsign "$@"