2021-11-24 22:49:15 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import argparse
|
|
|
|
import logging
|
|
|
|
import os
|
|
|
|
import re
|
2022-06-30 13:41:50 +00:00
|
|
|
from collections import namedtuple
|
|
|
|
from typing import Dict, List, Tuple
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-01-17 09:41:24 +00:00
|
|
|
from artifactory import ArtifactorySaaSPath # type: ignore
|
2021-11-25 10:36:00 +00:00
|
|
|
from build_download_helper import dowload_build_with_progress
|
2022-06-30 13:41:50 +00:00
|
|
|
from env_helper import RUNNER_TEMP, S3_BUILDS_BUCKET
|
2022-01-31 15:58:31 +00:00
|
|
|
from git_helper import TAG_REGEXP, commit, removeprefix, removesuffix
|
2022-01-12 17:11:58 +00:00
|
|
|
|
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
# Necessary ENV variables
|
2022-01-17 18:47:32 +00:00
|
|
|
def getenv(name: str, default: str = None):
|
2021-11-24 22:49:15 +00:00
|
|
|
env = os.getenv(name, default)
|
|
|
|
if env is not None:
|
|
|
|
return env
|
2021-11-25 09:30:31 +00:00
|
|
|
raise KeyError(f"Necessary {name} environment is not set")
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
|
2022-03-06 13:07:47 +00:00
|
|
|
TEMP_PATH = os.path.join(RUNNER_TEMP, "push_to_artifactory")
|
2021-11-24 22:49:15 +00:00
|
|
|
# One of the following ENVs is necessary
|
|
|
|
JFROG_API_KEY = getenv("JFROG_API_KEY", "")
|
|
|
|
JFROG_TOKEN = getenv("JFROG_TOKEN", "")
|
|
|
|
|
2022-06-30 13:41:50 +00:00
|
|
|
CheckDesc = namedtuple("CheckDesc", ("check_name", "deb_arch", "rpm_arch"))
|
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2021-11-25 16:06:37 +00:00
|
|
|
class Packages:
|
2022-06-30 13:41:50 +00:00
|
|
|
checks = (
|
|
|
|
CheckDesc("package_release", "amd64", "x86_64"),
|
|
|
|
CheckDesc("package_aarch64", "arm64", "aarch64"),
|
|
|
|
)
|
2021-11-24 22:49:15 +00:00
|
|
|
packages = (
|
2022-06-30 13:41:50 +00:00
|
|
|
"clickhouse-client",
|
|
|
|
"clickhouse-common-static",
|
|
|
|
"clickhouse-common-static-dbg",
|
|
|
|
"clickhouse-server",
|
2021-11-24 22:49:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
def __init__(self, version: str):
|
2022-06-30 13:41:50 +00:00
|
|
|
# Dicts of name: s3_path_suffix
|
|
|
|
self.deb = {} # type: Dict[str, str]
|
|
|
|
self.rpm = {} # type: Dict[str, str]
|
|
|
|
self.tgz = {} # type: Dict[str, str]
|
|
|
|
for check in self.checks:
|
|
|
|
for name in self.packages:
|
|
|
|
deb = f"{name}_{version}_{check.deb_arch}.deb"
|
|
|
|
self.deb[deb] = f"{check.check_name}/{deb}"
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-06-30 13:41:50 +00:00
|
|
|
rpm = f"{name}-{version}.{check.rpm_arch}.rpm"
|
|
|
|
self.rpm[rpm] = f"{check.check_name}/{rpm}"
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-06-30 13:41:50 +00:00
|
|
|
tgz = f"{name}-{version}-{check.deb_arch}.tgz"
|
|
|
|
self.tgz[tgz] = f"{check.check_name}/{tgz}"
|
2022-01-12 17:11:58 +00:00
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
def arch(self, deb_pkg: str) -> str:
|
2021-11-25 10:36:00 +00:00
|
|
|
if deb_pkg not in self.deb:
|
2022-03-06 13:07:47 +00:00
|
|
|
raise ValueError(f"{deb_pkg} not in {self.deb}")
|
2022-01-12 17:11:58 +00:00
|
|
|
return removesuffix(deb_pkg, ".deb").split("_")[-1]
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-06-30 13:41:50 +00:00
|
|
|
def replace_with_fallback(self, name: str):
|
|
|
|
if name.endswith(".deb"):
|
|
|
|
suffix = self.deb.pop(name)
|
|
|
|
self.deb[self.fallback_to_all(name)] = self.fallback_to_all(suffix)
|
|
|
|
elif name.endswith(".rpm"):
|
|
|
|
suffix = self.rpm.pop(name)
|
|
|
|
self.rpm[self.fallback_to_all(name)] = self.fallback_to_all(suffix)
|
|
|
|
elif name.endswith(".tgz"):
|
|
|
|
suffix = self.tgz.pop(name)
|
|
|
|
self.tgz[self.fallback_to_all(name)] = self.fallback_to_all(suffix)
|
|
|
|
else:
|
|
|
|
raise KeyError(f"unknown package type for {name}")
|
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
@staticmethod
|
2022-01-17 18:47:32 +00:00
|
|
|
def path(package_file: str) -> str:
|
|
|
|
return os.path.join(TEMP_PATH, package_file)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-06-30 13:41:50 +00:00
|
|
|
@staticmethod
|
|
|
|
def fallback_to_all(url_or_name: str):
|
|
|
|
"""Until July 2022 we had clickhouse-server and clickhouse-client with
|
|
|
|
arch 'all'"""
|
|
|
|
# deb
|
|
|
|
if url_or_name.endswith("amd64.deb") or url_or_name.endswith("arm64.deb"):
|
|
|
|
return f"{url_or_name[:-9]}all.deb"
|
|
|
|
# rpm
|
|
|
|
if url_or_name.endswith("x86_64.rpm") or url_or_name.endswith("aarch64.rpm"):
|
|
|
|
new = removesuffix(removesuffix(url_or_name, "x86_64.rpm"), "aarch64.rpm")
|
|
|
|
return f"{new}noarch.rpm"
|
|
|
|
# tgz
|
|
|
|
if url_or_name.endswith("-amd64.tgz") or url_or_name.endswith("-arm64.tgz"):
|
|
|
|
return f"{url_or_name[:-10]}.tgz"
|
|
|
|
return url_or_name
|
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2021-11-25 16:06:37 +00:00
|
|
|
class S3:
|
2021-11-24 22:49:15 +00:00
|
|
|
template = (
|
|
|
|
"https://s3.amazonaws.com/"
|
|
|
|
# "clickhouse-builds/"
|
2022-06-30 13:41:50 +00:00
|
|
|
f"{S3_BUILDS_BUCKET}/"
|
2021-11-29 14:03:16 +00:00
|
|
|
# "33333/" or "21.11/" from --release, if pull request is omitted
|
2021-11-24 22:49:15 +00:00
|
|
|
"{pr}/"
|
|
|
|
# "2bef313f75e4cacc6ea2ef2133e8849ecf0385ec/"
|
|
|
|
"{commit}/"
|
2022-06-30 13:41:50 +00:00
|
|
|
# "package_release/clickhouse-common-static_21.11.5.0_amd64.deb"
|
|
|
|
"{s3_path_suffix}"
|
2021-11-24 22:49:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
pr: int,
|
|
|
|
commit: str,
|
|
|
|
version: str,
|
2022-01-17 18:16:06 +00:00
|
|
|
force_download: bool,
|
2021-11-24 22:49:15 +00:00
|
|
|
):
|
|
|
|
self._common = dict(
|
|
|
|
pr=pr,
|
|
|
|
commit=commit,
|
|
|
|
)
|
2022-01-17 18:16:06 +00:00
|
|
|
self.force_download = force_download
|
2021-11-24 22:49:15 +00:00
|
|
|
self.packages = Packages(version)
|
|
|
|
|
2022-06-30 13:41:50 +00:00
|
|
|
def download_package(self, package_file: str, s3_path_suffix: str):
|
|
|
|
path = Packages.path(package_file)
|
|
|
|
fallback_path = Packages.fallback_to_all(path)
|
|
|
|
if not self.force_download and (
|
|
|
|
os.path.exists(path) or os.path.exists(fallback_path)
|
|
|
|
):
|
|
|
|
if os.path.exists(fallback_path):
|
|
|
|
self.packages.replace_with_fallback(package_file)
|
|
|
|
|
2022-01-17 18:16:06 +00:00
|
|
|
return
|
2022-06-30 13:41:50 +00:00
|
|
|
url = self.template.format_map(
|
|
|
|
{**self._common, "s3_path_suffix": s3_path_suffix}
|
|
|
|
)
|
|
|
|
try:
|
|
|
|
dowload_build_with_progress(url, path)
|
|
|
|
except Exception as e:
|
|
|
|
if "Cannot download dataset from" in e.args[0]:
|
|
|
|
new_url = Packages.fallback_to_all(url)
|
|
|
|
logging.warning(
|
|
|
|
"Fallback downloading %s for old release", fallback_path
|
|
|
|
)
|
|
|
|
dowload_build_with_progress(new_url, fallback_path)
|
|
|
|
self.packages.replace_with_fallback(package_file)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
def download_deb(self):
|
2022-06-30 13:41:50 +00:00
|
|
|
# Copy to have a way to pop/add fallback packages
|
|
|
|
packages = self.packages.deb.copy()
|
|
|
|
for package_file, s3_path_suffix in packages.items():
|
|
|
|
self.download_package(package_file, s3_path_suffix)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
def download_rpm(self):
|
2022-06-30 13:41:50 +00:00
|
|
|
# Copy to have a way to pop/add fallback packages
|
|
|
|
packages = self.packages.rpm.copy()
|
|
|
|
for package_file, s3_path_suffix in packages.items():
|
|
|
|
self.download_package(package_file, s3_path_suffix)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-01-12 17:11:58 +00:00
|
|
|
def download_tgz(self):
|
2022-06-30 13:41:50 +00:00
|
|
|
# Copy to have a way to pop/add fallback packages
|
|
|
|
packages = self.packages.tgz.copy()
|
|
|
|
for package_file, s3_path_suffix in packages.items():
|
|
|
|
self.download_package(package_file, s3_path_suffix)
|
2022-01-12 17:11:58 +00:00
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2021-11-25 16:06:37 +00:00
|
|
|
class Release:
|
2022-01-17 09:41:24 +00:00
|
|
|
def __init__(self, name: str):
|
2022-01-31 15:58:31 +00:00
|
|
|
r = re.compile(TAG_REGEXP)
|
2022-01-12 17:11:58 +00:00
|
|
|
# Automatically remove refs/tags/ if full refname passed here
|
|
|
|
name = removeprefix(name, "refs/tags/")
|
2021-11-24 22:49:15 +00:00
|
|
|
if not r.match(name):
|
|
|
|
raise argparse.ArgumentTypeError(
|
2022-01-12 17:11:58 +00:00
|
|
|
f"release name {name} does not match "
|
2021-11-29 14:03:16 +00:00
|
|
|
"v12.1.2.15-(testing|prestable|stable|lts) pattern"
|
2021-11-24 22:49:15 +00:00
|
|
|
)
|
|
|
|
self._name = name
|
2022-01-12 17:11:58 +00:00
|
|
|
self._version = removeprefix(self._name, "v")
|
2021-11-29 14:03:16 +00:00
|
|
|
self._version = self.version.split("-")[0]
|
|
|
|
self._version_parts = tuple(self.version.split("."))
|
2021-11-25 16:06:37 +00:00
|
|
|
self._type = self._name.split("-")[-1]
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def version(self) -> str:
|
|
|
|
return self._version
|
|
|
|
|
2021-11-29 14:03:16 +00:00
|
|
|
@property
|
2022-01-17 09:41:24 +00:00
|
|
|
def version_parts(self) -> Tuple[str, ...]:
|
2021-11-29 14:03:16 +00:00
|
|
|
return self._version_parts
|
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
@property
|
|
|
|
def type(self) -> str:
|
|
|
|
return self._type
|
|
|
|
|
|
|
|
|
2021-11-25 16:06:37 +00:00
|
|
|
class Artifactory:
|
2022-01-17 18:16:06 +00:00
|
|
|
def __init__(
|
|
|
|
self, url: str, release: str, deb_repo="deb", rpm_repo="rpm", tgz_repo="tgz"
|
|
|
|
):
|
2021-11-24 22:49:15 +00:00
|
|
|
self._url = url
|
|
|
|
self._release = release
|
|
|
|
self._deb_url = "/".join((self._url, deb_repo, "pool", self._release)) + "/"
|
|
|
|
self._rpm_url = "/".join((self._url, rpm_repo, self._release)) + "/"
|
2022-01-17 18:16:06 +00:00
|
|
|
self._tgz_url = "/".join((self._url, tgz_repo, self._release)) + "/"
|
2021-11-25 16:06:37 +00:00
|
|
|
# check the credentials ENVs for early exit
|
|
|
|
self.__path_helper("_deb", "")
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
def deploy_deb(self, packages: Packages):
|
2022-01-17 18:47:32 +00:00
|
|
|
for package_file in packages.deb:
|
|
|
|
path = packages.path(package_file)
|
2021-11-25 10:36:00 +00:00
|
|
|
dist = self._release
|
|
|
|
comp = "main"
|
2022-01-17 18:47:32 +00:00
|
|
|
arch = packages.arch(package_file)
|
2021-11-25 10:36:00 +00:00
|
|
|
logging.info(
|
2022-01-17 09:41:24 +00:00
|
|
|
"Deploy %s(distribution=%s;component=%s;architecture=%s) "
|
|
|
|
"to artifactory",
|
2021-11-25 16:06:37 +00:00
|
|
|
path,
|
|
|
|
dist,
|
|
|
|
comp,
|
|
|
|
arch,
|
2021-11-24 22:49:15 +00:00
|
|
|
)
|
2022-01-17 18:47:32 +00:00
|
|
|
self.deb_path(package_file).deploy_deb(path, dist, comp, arch)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
def deploy_rpm(self, packages: Packages):
|
2022-01-17 18:47:32 +00:00
|
|
|
for package_file in packages.rpm:
|
|
|
|
path = packages.path(package_file)
|
2021-11-25 16:06:37 +00:00
|
|
|
logging.info("Deploy %s to artifactory", path)
|
2022-01-17 18:47:32 +00:00
|
|
|
self.rpm_path(package_file).deploy_file(path)
|
2022-01-17 18:16:06 +00:00
|
|
|
|
|
|
|
def deploy_tgz(self, packages: Packages):
|
2022-01-17 18:47:32 +00:00
|
|
|
for package_file in packages.tgz:
|
|
|
|
path = packages.path(package_file)
|
2022-01-17 18:16:06 +00:00
|
|
|
logging.info("Deploy %s to artifactory", path)
|
2022-01-17 18:47:32 +00:00
|
|
|
self.tgz_path(package_file).deploy_file(path)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-01-17 18:47:32 +00:00
|
|
|
def __path_helper(self, name: str, package_file: str) -> ArtifactorySaaSPath:
|
|
|
|
url = "/".join((getattr(self, name + "_url"), package_file))
|
2021-11-24 22:49:15 +00:00
|
|
|
path = None
|
|
|
|
if JFROG_API_KEY:
|
|
|
|
path = ArtifactorySaaSPath(url, apikey=JFROG_API_KEY)
|
|
|
|
elif JFROG_TOKEN:
|
|
|
|
path = ArtifactorySaaSPath(url, token=JFROG_TOKEN)
|
|
|
|
else:
|
2021-11-25 09:30:31 +00:00
|
|
|
raise KeyError("Neither JFROG_API_KEY nor JFROG_TOKEN env are defined")
|
2021-11-24 22:49:15 +00:00
|
|
|
return path
|
|
|
|
|
2022-01-17 18:47:32 +00:00
|
|
|
def deb_path(self, package_file: str) -> ArtifactorySaaSPath:
|
|
|
|
return self.__path_helper("_deb", package_file)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-01-17 18:47:32 +00:00
|
|
|
def rpm_path(self, package_file: str) -> ArtifactorySaaSPath:
|
|
|
|
return self.__path_helper("_rpm", package_file)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
2022-01-17 18:47:32 +00:00
|
|
|
def tgz_path(self, package_file: str) -> ArtifactorySaaSPath:
|
|
|
|
return self.__path_helper("_tgz", package_file)
|
2022-01-17 18:16:06 +00:00
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
def parse_args() -> argparse.Namespace:
|
|
|
|
parser = argparse.ArgumentParser(
|
|
|
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
|
|
|
description="Program to download artifacts from S3 and push them to "
|
|
|
|
"artifactory. ENV variables JFROG_API_KEY and JFROG_TOKEN are used "
|
|
|
|
"for authentication in the given order",
|
|
|
|
)
|
2021-11-29 14:03:16 +00:00
|
|
|
parser.add_argument(
|
|
|
|
"--release",
|
|
|
|
required=True,
|
|
|
|
type=Release,
|
2022-01-12 17:11:58 +00:00
|
|
|
help="release name, e.g. v12.13.14.15-prestable; 'refs/tags/' "
|
|
|
|
"prefix is striped automatically",
|
2021-11-29 14:03:16 +00:00
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
"--pull-request",
|
|
|
|
type=int,
|
|
|
|
default=0,
|
|
|
|
help="pull request number; if PR is omitted, the first two numbers "
|
|
|
|
"from release will be used, e.g. 12.11",
|
|
|
|
)
|
2021-11-24 22:49:15 +00:00
|
|
|
parser.add_argument(
|
|
|
|
"--commit", required=True, type=commit, help="commit hash for S3 bucket"
|
|
|
|
)
|
2022-01-12 17:11:58 +00:00
|
|
|
parser.add_argument(
|
|
|
|
"--all", action="store_true", help="implies all deb, rpm and tgz"
|
|
|
|
)
|
2021-11-24 22:49:15 +00:00
|
|
|
parser.add_argument(
|
|
|
|
"--deb", action="store_true", help="if Debian packages should be processed"
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
"--rpm", action="store_true", help="if RPM packages should be processed"
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
2022-01-12 17:11:58 +00:00
|
|
|
"--tgz",
|
|
|
|
action="store_true",
|
|
|
|
help="if tgz archives should be processed. They aren't pushed to artifactory",
|
|
|
|
)
|
|
|
|
parser.add_argument(
|
|
|
|
"--artifactory-url",
|
|
|
|
default="https://clickhousedb.jfrog.io/artifactory",
|
|
|
|
help="SaaS Artifactory url",
|
|
|
|
)
|
2022-02-21 11:44:37 +00:00
|
|
|
parser.add_argument("--artifactory", default=True, help=argparse.SUPPRESS)
|
2022-01-12 17:11:58 +00:00
|
|
|
parser.add_argument(
|
|
|
|
"-n",
|
|
|
|
"--no-artifactory",
|
2022-02-21 11:44:37 +00:00
|
|
|
action="store_false",
|
|
|
|
dest="artifactory",
|
|
|
|
default=argparse.SUPPRESS,
|
2022-01-12 17:11:58 +00:00
|
|
|
help="do not push packages to artifactory",
|
2021-11-24 22:49:15 +00:00
|
|
|
)
|
2022-02-21 11:44:37 +00:00
|
|
|
parser.add_argument("--force-download", default=True, help=argparse.SUPPRESS)
|
2022-01-17 18:16:06 +00:00
|
|
|
parser.add_argument(
|
|
|
|
"--no-force-download",
|
2022-02-21 11:44:37 +00:00
|
|
|
action="store_false",
|
|
|
|
dest="force_download",
|
|
|
|
default=argparse.SUPPRESS,
|
2022-01-17 18:16:06 +00:00
|
|
|
help="do not download packages again if they exist already",
|
|
|
|
)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
args = parser.parse_args()
|
2022-01-12 17:11:58 +00:00
|
|
|
if args.all:
|
|
|
|
args.deb = args.rpm = args.tgz = True
|
|
|
|
if not (args.deb or args.rpm or args.tgz):
|
|
|
|
parser.error("at least one of --deb, --rpm or --tgz should be specified")
|
2021-11-29 14:03:16 +00:00
|
|
|
if args.pull_request == 0:
|
|
|
|
args.pull_request = ".".join(args.release.version_parts[:2])
|
2021-11-24 22:49:15 +00:00
|
|
|
return args
|
|
|
|
|
|
|
|
|
2022-03-17 19:59:46 +00:00
|
|
|
def process_deb(s3: S3, art_clients: List[Artifactory]):
|
2022-01-17 18:16:06 +00:00
|
|
|
s3.download_deb()
|
2022-03-17 19:59:46 +00:00
|
|
|
for art_client in art_clients:
|
2022-01-17 18:16:06 +00:00
|
|
|
art_client.deploy_deb(s3.packages)
|
|
|
|
|
|
|
|
|
2022-03-17 19:59:46 +00:00
|
|
|
def process_rpm(s3: S3, art_clients: List[Artifactory]):
|
2022-01-17 18:16:06 +00:00
|
|
|
s3.download_rpm()
|
2022-03-17 19:59:46 +00:00
|
|
|
for art_client in art_clients:
|
2022-01-17 18:16:06 +00:00
|
|
|
art_client.deploy_rpm(s3.packages)
|
|
|
|
|
|
|
|
|
2022-03-17 19:59:46 +00:00
|
|
|
def process_tgz(s3: S3, art_clients: List[Artifactory]):
|
2022-01-17 18:16:06 +00:00
|
|
|
s3.download_tgz()
|
2022-03-17 19:59:46 +00:00
|
|
|
for art_client in art_clients:
|
2022-01-17 18:16:06 +00:00
|
|
|
art_client.deploy_tgz(s3.packages)
|
|
|
|
|
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
def main():
|
|
|
|
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
|
|
|
|
args = parse_args()
|
2022-03-17 16:44:01 +00:00
|
|
|
os.makedirs(TEMP_PATH, exist_ok=True)
|
2021-11-24 22:49:15 +00:00
|
|
|
s3 = S3(
|
|
|
|
args.pull_request,
|
|
|
|
args.commit,
|
|
|
|
args.release.version,
|
2022-02-21 11:44:37 +00:00
|
|
|
args.force_download,
|
2021-11-24 22:49:15 +00:00
|
|
|
)
|
2022-03-17 19:59:46 +00:00
|
|
|
art_clients = []
|
2022-02-21 11:44:37 +00:00
|
|
|
if args.artifactory:
|
2022-03-17 19:59:46 +00:00
|
|
|
art_clients.append(Artifactory(args.artifactory_url, args.release.type))
|
|
|
|
if args.release.type == "lts":
|
|
|
|
art_clients.append(Artifactory(args.artifactory_url, "stable"))
|
2022-01-12 17:11:58 +00:00
|
|
|
|
2021-11-24 22:49:15 +00:00
|
|
|
if args.deb:
|
2022-03-17 19:59:46 +00:00
|
|
|
process_deb(s3, art_clients)
|
2021-11-24 22:49:15 +00:00
|
|
|
if args.rpm:
|
2022-03-17 19:59:46 +00:00
|
|
|
process_rpm(s3, art_clients)
|
2022-01-12 17:11:58 +00:00
|
|
|
if args.tgz:
|
2022-03-17 19:59:46 +00:00
|
|
|
process_tgz(s3, art_clients)
|
2021-11-24 22:49:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|