def sourcedeb_job(package,
                  maintainer_emails,
                  distros,
                  fqdn,
                  release_uri,
                  child_projects,
                  rosdistro,
                  short_package_name,
                  timeout=None,
                  ssh_key_id=None):
    jenkins_config = jenkins_support.load_server_config_file(
        jenkins_support.get_default_catkin_debs_config())
    d = dict(ROSDISTRO_INDEX_URL=get_index_url(),
             RELEASE_URI=release_uri,
             RELEASE_BRANCH='master',
             FQDN=fqdn,
             DISTROS=distros,
             CHILD_PROJECTS=child_projects,
             PACKAGE=package,
             NOTIFICATION_EMAIL=' '.join(maintainer_emails),
             ROSDISTRO=rosdistro,
             SHORT_PACKAGE_NAME=short_package_name,
             USERNAME=jenkins_config.username,
             TIMEOUT=timeout,
             SSH_KEY_ID=ssh_key_id)
    return (sourcedeb_job_name(package), create_sourcedeb_config(d))
def binarydeb_jobs(package, maintainer_emails, distros, arches, apt_target_repository, fqdn, jobgraph, rosdistro, short_package_name, timeout=None, ssh_key_id=None):
    jenkins_config = jenkins_support.load_server_config_file(jenkins_support.get_default_catkin_debs_config())
    d = dict(
        ROSDISTRO_INDEX_URL=get_index_url(),
        ROSDISTRO=rosdistro,
        DISTROS=distros,
        APT_TARGET_REPOSITORY=apt_target_repository,
        FQDN=fqdn,
        PACKAGE=package,
        NOTIFICATION_EMAIL=' '.join(maintainer_emails),
        USERNAME=jenkins_config.username,
        SHORT_PACKAGE_NAME=short_package_name,
        TIMEOUT=timeout,
        SSH_KEY_ID=ssh_key_id
    )
    jobs = []
    first_matrix_job = True
    for distro in distros:
        for arch in arches:
            d['ARCH'] = arch
            d['DISTRO'] = distro
            d["CHILD_PROJECTS"] = calc_child_jobs(package, distro, arch, jobgraph)
            d["DEPENDENTS"] = add_dependent_to_dict(package, jobgraph)
            if first_matrix_job:
                # build first distro/arch before others
                d['PRIORITY'] = 899
                first_matrix_job = False
            else:
                d['PRIORITY'] = 900
            config = create_binarydeb_config(d)
            #print(config)
            job_name = binarydeb_job_name(package, distro, arch)
            jobs.append((job_name, config))
    return jobs
def sourcedeb_job(package, maintainer_emails, distros, fqdn, release_uri, child_projects, rosdistro, short_package_name, timeout=None, ssh_key_id=None):
    jenkins_config = jenkins_support.load_server_config_file(jenkins_support.get_default_catkin_debs_config())
    d = dict(
        ROSDISTRO_INDEX_URL=get_index_url(),
        RELEASE_URI=release_uri,
        RELEASE_BRANCH='master',
        FQDN=fqdn,
        DISTROS=distros,
        CHILD_PROJECTS=child_projects,
        PACKAGE=package,
        NOTIFICATION_EMAIL=' '.join(maintainer_emails),
        ROSDISTRO=rosdistro,
        SHORT_PACKAGE_NAME=short_package_name,
        USERNAME=jenkins_config.username,
        TIMEOUT=timeout,
        SSH_KEY_ID=ssh_key_id
    )
    return (sourcedeb_job_name(package), create_sourcedeb_config(d))
def binarydeb_jobs(package,
                   maintainer_emails,
                   distros,
                   arches,
                   apt_target_repository,
                   fqdn,
                   jobgraph,
                   rosdistro,
                   short_package_name,
                   timeout=None,
                   ssh_key_id=None):
    jenkins_config = jenkins_support.load_server_config_file(
        jenkins_support.get_default_catkin_debs_config())
    d = dict(ROSDISTRO_INDEX_URL=get_index_url(),
             ROSDISTRO=rosdistro,
             DISTROS=distros,
             APT_TARGET_REPOSITORY=apt_target_repository,
             FQDN=fqdn,
             PACKAGE=package,
             NOTIFICATION_EMAIL=' '.join(maintainer_emails),
             USERNAME=jenkins_config.username,
             SHORT_PACKAGE_NAME=short_package_name,
             TIMEOUT=timeout,
             SSH_KEY_ID=ssh_key_id)
    jobs = []
    first_matrix_job = True
    for distro in distros:
        for arch in arches:
            d['ARCH'] = arch
            d['DISTRO'] = distro
            d["CHILD_PROJECTS"] = calc_child_jobs(package, distro, arch,
                                                  jobgraph)
            d["DEPENDENTS"] = add_dependent_to_dict(package, jobgraph)
            if first_matrix_job:
                # build first distro/arch before others
                d['PRIORITY'] = 899
                first_matrix_job = False
            else:
                d['PRIORITY'] = 900
            config = create_binarydeb_config(d)
            #print(config)
            job_name = binarydeb_job_name(package, distro, arch)
            jobs.append((job_name, config))
    return jobs