Exemplo n.º 1
0
def create_etc_slave_config():
    """ creates /etc/slave_config directory on master

    /etc/slave_config is used by jenkins slave_plugin.
    it allows files to be copied from the master to the slave.
    These files are copied to /etc/slave_config on the slave.
    """
    # TODO: fix these permissions, likely ubuntu/centos/jenkins users
    # need read/write permissions.
    log_green('create /etc/slave_config')
    with settings(hide('warnings', 'running', 'stdout', 'stderr'),
                  warn_only=True, capture=True):
        dir_ensure('/etc/slave_config', mode="777", use_sudo=True)
Exemplo n.º 2
0
def install_python_pypy(version,
                        replace=False,
                        pypy_home='/opt/python-pypy',
                        mode='755'):
    """ installs python pypy """
    dir_ensure(pypy_home, mode=mode, use_sudo=True)
    pypy_path = "%s/%s/bin/pypy" % (pypy_home, version)
    pathname = "pypy-%s-linux_x86_64-portable" % version
    tgz = "%s.tar.bz2" % pathname
    url = "https://bitbucket.org/squeaky/portable-pypy/downloads/%s" % tgz

    if not file_exists(pypy_path):
        with cd(pypy_home):
            sudo('wget -c %s' % url)
            sudo('tar xjf %s' % tgz)
            sudo('mv %s %s' % (pathname, version))
            sudo('ln -s %s /usr/local/bin/pypy' % pypy_path)