Skip to content

Commit 74e7bc2

Browse files
authored
Merge pull request #862 from moreati/release-0.3.0
Release 0.3.0
2 parents d3f6ad7 + 55f973e commit 74e7bc2

File tree

194 files changed

+2286
-865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+2286
-865
lines changed

.ci/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
# `.ci`
33

4-
This directory contains scripts for Travis CI and (more or less) Azure
5-
Pipelines, but they will also happily run on any Debian-like machine.
4+
This directory contains scripts for Continuous Integration platforms. Currently
5+
Azure Pipelines, but they will also happily run on any Debian-like machine.
66

77
The scripts are usually split into `_install` and `_test` steps. The `_install`
88
step will damage your machine, the `_test` step will just run the tests the way

.ci/ansible_install.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,22 @@
66
[
77
# Must be installed separately, as PyNACL indirect requirement causes
88
# newer version to be installed if done in a single pip run.
9+
# Separately install ansible based on version passed in from azure-pipelines.yml or .travis.yml
910
'pip install "pycparser<2.19" "idna<2.7"',
1011
'pip install '
1112
'-r tests/requirements.txt '
1213
'-r tests/ansible/requirements.txt',
14+
# encoding is required for installing ansible 2.10 with pip2, otherwise we get a UnicodeDecode error
15+
'LC_CTYPE=en_US.UTF-8 LANG=en_US.UTF-8 pip install "ansible-base<2.10.14" "ansible=={}"'.format(ci_lib.ANSIBLE_VERSION)
16+
],
17+
[
18+
'aws ecr-public get-login-password | docker login --username AWS --password-stdin public.ecr.aws',
1319
]
1420
]
1521

16-
batches.extend(
17-
['docker pull %s' % (ci_lib.image_for_distro(distro),)]
22+
batches[-1].extend([
23+
'docker pull %s' % (ci_lib.image_for_distro(distro),)
1824
for distro in ci_lib.DISTROS
19-
)
25+
])
2026

2127
ci_lib.run_batches(batches)

.ci/ansible_tests.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ def pause_if_interactive():
3737

3838

3939
with ci_lib.Fold('job_setup'):
40-
# Don't set -U as that will upgrade Paramiko to a non-2.6 compatible version.
41-
run("pip install -q ansible==%s", ci_lib.ANSIBLE_VERSION)
42-
4340
os.chdir(TESTS_DIR)
4441
os.chmod('../data/docker/mitogen__has_sudo_pubkey.key', int('0600', 7))
4542

@@ -69,13 +66,11 @@ def pause_if_interactive():
6966
run("sudo apt-get update")
7067
run("sudo apt-get install -y sshpass")
7168

72-
run("bash -c 'sudo ln -vfs /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py /usr/lib/python2.7 || true'")
73-
run("bash -c 'sudo ln -vfs /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py $VIRTUAL_ENV/lib/python2.7 || true'")
7469

7570
with ci_lib.Fold('ansible'):
7671
playbook = os.environ.get('PLAYBOOK', 'all.yml')
7772
try:
78-
run('./run_ansible_playbook.py %s -i "%s" %s',
73+
run('./run_ansible_playbook.py %s -i "%s" -vvv %s',
7974
playbook, HOSTS_DIR, ' '.join(sys.argv[1:]))
8075
except:
8176
pause_if_interactive()

.ci/azure-pipelines-steps.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,17 @@ steps:
88
- script: "PYTHONVERSION=$(python.version) .ci/prep_azure.py"
99
displayName: "Run prep_azure.py"
1010

11-
# The VSTS-shipped Pythons available via UsePythonVErsion are pure garbage,
12-
# broken symlinks, incorrect permissions and missing codecs. So we use the
13-
# deadsnakes PPA to get sane Pythons, and setup a virtualenv to install our
14-
# stuff into. The virtualenv can probably be removed again, but this was a
15-
# hard-fought battle and for now I am tired of this crap.
1611
- script: |
17-
sudo ln -fs /usr/bin/python$(python.version) /usr/bin/python
18-
/usr/bin/python -m pip install -U virtualenv setuptools wheel
19-
/usr/bin/python -m virtualenv /tmp/venv -p /usr/bin/python$(python.version)
2012
echo "##vso[task.prependpath]/tmp/venv/bin"
2113
2214
displayName: activate venv
2315

24-
- script: .ci/spawn_reverse_shell.py
25-
displayName: "Spawn reverse shell"
26-
2716
- script: .ci/$(MODE)_install.py
2817
displayName: "Run $(MODE)_install.py"
18+
env:
19+
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
20+
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
21+
AWS_DEFAULT_REGION: $(AWS_DEFAULT_REGION)
2922

3023
- script: .ci/$(MODE)_tests.py
3124
displayName: "Run $(MODE)_tests.py"

.ci/azure-pipelines.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,35 @@
66
jobs:
77

88
- job: Mac
9+
# vanilla Ansible is really slow
10+
timeoutInMinutes: 120
911
steps:
1012
- template: azure-pipelines-steps.yml
1113
pool:
12-
vmImage: macOS-10.13
14+
vmImage: macOS-10.15
1315
strategy:
1416
matrix:
1517
Mito27_27:
1618
python.version: '2.7'
1719
MODE: mitogen
18-
Ans280_27:
20+
# TODO: test python3, python3 tests are broken
21+
Ans210_27:
1922
python.version: '2.7'
2023
MODE: localhost_ansible
24+
VER: 2.10.0
25+
26+
# NOTE: this hangs when ran in Ubuntu 18.04
27+
Vanilla_210_27:
28+
python.version: '2.7'
29+
MODE: localhost_ansible
30+
VER: 2.10.0
31+
STRATEGY: linear
32+
ANSIBLE_SKIP_TAGS: resource_intensive
2133

2234

2335
- job: Linux
2436
pool:
25-
vmImage: "Ubuntu 16.04"
37+
vmImage: "Ubuntu 18.04"
2638
steps:
2739
- template: azure-pipelines-steps.yml
2840
strategy:
@@ -33,7 +45,7 @@ jobs:
3345
Mito27Debian_27:
3446
python.version: '2.7'
3547
MODE: mitogen
36-
DISTRO: debian
48+
DISTRO: debian9
3749

3850
#MitoPy27CentOS6_26:
3951
#python.version: '2.7'
@@ -45,9 +57,16 @@ jobs:
4557
MODE: mitogen
4658
DISTRO: centos6
4759

48-
#
49-
#
50-
#
60+
Mito37Debian_27:
61+
python.version: '3.7'
62+
MODE: mitogen
63+
DISTRO: debian9
64+
65+
Mito39Debian_27:
66+
python.version: '3.9'
67+
MODE: mitogen
68+
DISTRO: debian9
69+
VER: 2.10.0
5170

5271
#Py26CentOS7:
5372
#python.version: '2.7'
@@ -91,12 +110,17 @@ jobs:
91110
#DISTROS: debian
92111
#STRATEGY: linear
93112

94-
Ansible_280_27:
113+
Ansible_210_27:
95114
python.version: '2.7'
96115
MODE: ansible
97-
VER: 2.8.0
116+
VER: 2.10.0
98117

99-
Ansible_280_35:
118+
Ansible_210_35:
100119
python.version: '3.5'
101120
MODE: ansible
102-
VER: 2.8.0
121+
VER: 2.10.0
122+
123+
Ansible_210_39:
124+
python.version: '3.9'
125+
MODE: ansible
126+
VER: 2.10.0

0 commit comments

Comments
 (0)