示例#1
0
def cmd_publish(cfg):
    """
    Publish (copy) the kernel tarball, configuration, and build information to
    the specified location, generating their resulting URLs, using the
    specified "publisher". Only "cp" and "scp" pusblishers are supported at the
    moment.

    Args:
        cfg:    A dictionary of skt configuration.
    """
    publisher = skt.publisher.getpublisher(*cfg.get('publisher'))

    if not cfg.get('tarpkg'):
        raise Exception("skt publish is missing \"--tarpkg <path>\" option")

    infourl = None
    cfgurl = None

    url = publisher.publish(cfg.get('tarpkg'))
    logging.info("published url: %s", url)

    if cfg.get('buildinfo'):
        infourl = publisher.publish(cfg.get('buildinfo'))

    if cfg.get('buildconf'):
        cfgurl = publisher.publish(cfg.get('buildconf'))

    save_state(cfg, {'buildurl': url, 'cfgurl': cfgurl, 'infourl': infourl})
示例#2
0
def cmd_publish(cfg):
    publisher = skt.publisher.getpublisher(*cfg.get('publisher'))

    infourl = None
    url = publisher.publish(cfg.get('tarpkg'))
    logging.info("published url: %s", url)

    if cfg.get('buildinfo') != None:
        infourl = publisher.publish(cfg.get('buildinfo'))

    if cfg.get('buildconf') != None:
        cfgurl = publisher.publish(cfg.get('buildconf'))

    save_state(cfg, {'buildurl': url, 'cfgurl': cfgurl, 'infourl': infourl})
示例#3
0
文件: executable.py 项目: ckalina/skt
def cmd_publish(cfg):
    """
    Publish (copy) the kernel tarball and configuration to the specified
    location, generating their resulting URLs, using the specified "publisher".
    Only "cp", "scp" and "sftp" publishers are supported at the moment.

    Args:
        cfg:    A dictionary of skt configuration.
    """
    publisher = skt.publisher.getpublisher(*cfg.get('publisher'))

    if cfg.get('buildconf'):
        cfgurl = publisher.publish(cfg.get('buildconf'))
        save_state(cfg, {'cfgurl': cfgurl})

    if cfg.get('tarpkg'):
        url = publisher.publish(cfg.get('tarpkg'))
        logging.info("published tarpkg url: %s", url)
        save_state(cfg, {'buildurl': url})
    else:
        logging.debug('No kernel tarball to publish found!')