Exemple #1
0
#!/usr/bin/env python

import ci_lib

batches = [[
    'pip install "pycparser<2.19"',
    'pip install -r tests/requirements.txt',
], [
    'docker pull %s' % (ci_lib.image_for_distro(ci_lib.DISTRO), ),
]]

ci_lib.run_batches(batches)
Exemple #2
0
#!/usr/bin/env python

import ci_lib

batches = [[
    # Must be installed separately, as PyNACL indirect requirement causes
    # newer version to be installed if done in a single pip run.
    # Separately install ansible based on version passed in from azure-pipelines.yml or .travis.yml
    'pip install "pycparser<2.19" "idna<2.7"',
    'pip install '
    '-r tests/requirements.txt '
    '-r tests/ansible/requirements.txt',
    # encoding is required for installing ansible 2.10 with pip2, otherwise we get a UnicodeDecode error
    'LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 pip install -q ansible=={0}'.format(
        ci_lib.ANSIBLE_VERSION)
]]

batches.append(
    ci_lib.throttle('docker pull %s' % (ci_lib.image_for_distro(distro), )
                    for distro in ci_lib.DISTROS))

ci_lib.run_batches(batches)
#!/usr/bin/env python

import ci_lib

# Naturally DebOps only supports Debian.
ci_lib.DISTROS = ['debian']

ci_lib.run_batches([
    [
        # Must be installed separately, as PyNACL indirect requirement causes
        # newer version to be installed if done in a single pip run.
        'pip install "pycparser<2.19"',
        'pip install -qqq debops[ansible]==2.1.2 ansible==%s' %
        ci_lib.ANSIBLE_VERSION,
    ],
    [
        'docker pull %s' % (ci_lib.image_for_distro('debian'), ),
    ],
])

ci_lib.run('ansible-galaxy collection install debops.debops:==2.1.2')
Exemple #4
0
    venv_steps.append('brew install python@{pv} postgresql'.format(
        pv=os.environ['PYTHONVERSION']))

# need wheel before building virtualenv because of bdist_wheel and setuptools deps
venv_steps.append(
    '/usr/local/bin/python{pv} -m pip install -U pip wheel setuptools'.format(
        pv=os.environ['PYTHONVERSION']))

if os.environ['PYTHONVERSION'].startswith('2'):
    venv_steps.extend([
        '/usr/local/bin/python{pv} -m pip install -U virtualenv'.format(
            pv=os.environ['PYTHONVERSION']),
        '/usr/local/bin/python{pv} -m virtualenv /tmp/venv -p /usr/local/bin/python{pv}'
        .format(pv=os.environ['PYTHONVERSION'])
    ])
else:
    venv_steps.append('/usr/local/bin/python{pv} -m venv /tmp/venv'.format(
        pv=os.environ['PYTHONVERSION']))
# fixes https://stackoverflow.com/questions/59595649/can-not-install-psycopg2-on-macos-catalina https://github.com/Azure/azure-cli/issues/12854#issuecomment-619213863
if need_to_fix_psycopg2:
    venv_steps.append(
        '/tmp/venv/bin/pip3 install psycopg2==2.8.5 psycopg2-binary')

batches.append(venv_steps)

if ci_lib.have_docker():
    batches.extend(['docker pull %s' % (ci_lib.image_for_distro(distro), )]
                   for distro in ci_lib.DISTROS)

ci_lib.run_batches(batches)
Exemple #5
0
#!/usr/bin/env python

import ci_lib

batches = [
    [
        # Must be installed separately, as PyNACL indirect requirement causes
        # newer version to be installed if done in a single pip run.
        'pip install "pycparser<2.19" "idna<2.7"',
        'pip install '
            '-r tests/requirements.txt '
            '-r tests/ansible/requirements.txt',
    ]
]

batches.extend(
    ['docker pull %s' % (ci_lib.image_for_distro(distro),)]
    for distro in ci_lib.DISTROS
)

ci_lib.run_batches(batches)