Exemplo n.º 1
0
def configure_s3cmd(config):
    """
    Install configuration for s3cmd.

    This allows the slave to upload vagrant images to S3.
    """
    s3_config = FilePath(__file__).sibling('s3-config.in').getContent()
    put(StringIO(s3_config.format(
        aws_access_key_id=config['aws_access_key_id'],
        aws_secret_access_key=config['aws_secret_access_key'],
        )), '/home/buildslave/.s3cfg')
Exemplo n.º 2
0
def configure_s3cmd(config):
    """
    Install configuration for s3cmd.

    This allows the slave to upload vagrant images to S3.
    """
    s3_config = FilePath(__file__).sibling('s3-config.in').getContent()
    put(
        StringIO(
            s3_config.format(
                aws_access_key_id=config['aws_access_key_id'],
                aws_secret_access_key=config['aws_secret_access_key'],
            )), '/home/buildslave/.s3cfg')
Exemplo n.º 3
0
def _generateControlFile(package, provides, description=None):
    """
    Generate a control file for C{package}.

    @returns: the control file
    @rtype: L{file}-like
    """
    if description is None:
        description = 'Dummy provider of %s.' % provides

    template = FilePath(__file__).sibling('equivs.control').getContent()
    body = template.format(package=package, provides=provides, description=description)
    return StringIO(body)
Exemplo n.º 4
0
def _generateControlFile(package, provides, description=None):
    """
    Generate a control file for C{package}.

    @returns: the control file
    @rtype: L{file}-like
    """
    if description is None:
        description = 'Dummy provider of %s.' % provides

    template = FilePath(__file__).sibling('equivs.control').getContent()
    body = template.format(package=package,
                           provides=provides,
                           description=description)
    return StringIO(body)