示例#1
0
def create_archive(revision):
    tmp_folder = dir.temp_local()
    tmp_tar = os.path.join(tmp_folder, 'repo.tar.gz')

    core.local('git archive --format=tar %(rev)s | gzip > %(tar)s' % {
        'rev': revision,
        'tar': tmp_tar
    })

    return tmp_tar
示例#2
0
def create_archive(revision):
    tmp_folder = dir.temp_local()
    tmp_tar = os.path.join(tmp_folder, 'repo.tar.gz')

    core.local(
        'git archive --format=tar %(rev)s | gzip > %(tar)s'
        % {'rev': revision, 'tar': tmp_tar}
    )

    return tmp_tar
示例#3
0
def select():
    if not is_running():
        log.abort("Vagrant based VM currently NOT running")
        return

    config_path = os.path.join(dir.temp_local(), "vagrant_ssh_config")
    core.local("vagrant ssh-config > %s" % config_path)

    core.env.hosts = ["default"]
    core.env.password = "******"
    core.env.ssh_config_path = config_path
    core.env.use_ssh_config = True
示例#4
0
def select():
    if not is_running():
        log.abort("Vagrant based VM currently NOT running")
        return

    config_path = os.path.join(dir.temp_local(), "vagrant_ssh_config")
    core.local("vagrant ssh-config > %s" % config_path)

    core.env.hosts = ["default"]
    core.env.password = "******"
    core.env.ssh_config_path = config_path
    core.env.use_ssh_config = True
示例#5
0
def test_temp_local(mkdtemp):
    mkdtemp.expects_call().returns(run_result("path"))
    assert directory.temp_local() == "path"
示例#6
0
def test_temp_local(mkdtemp):
    mkdtemp.expects_call().returns(run_result("path"))
    assert directory.temp_local() == "path"