remove tox and build native drone test environments

This commit is contained in:
Robert Kaussow 2019-03-22 10:08:11 +01:00
parent f882ecbbfd
commit 6eae4ecbd5
3 changed files with 213 additions and 30 deletions

View File

@ -1,32 +1,34 @@
local PythonVersions(pyversion="2.7", py="27") = {
name: "python" + pyversion,
local PipelineEmvironment(pyversion="2.7", ansibleversion="2.4") = {
name: "ansible" + ansibleversion,
image: "python:" + pyversion,
pull: "always",
commands: [
"pip install tox -q",
"tox -e $(tox -l | grep py" + py + " | xargs | sed 's/ /,/g') -q",
"pip install -q ansible~=" + ansibleversion,
"pip install -q -r tests/requirements.txt",
"pip install -q .",
"ansible-later -c tests/config/config.ini tests/data/yaml_success.yml"
],
depends_on: [
"clone",
],
};
local PipelineTesting = {
local PipelineTesting(pyversion="2.7") = {
kind: "pipeline",
name: "testing",
name: "python-" + pyversion,
platform: {
os: "linux",
arch: "amd64",
},
steps: [
PythonVersions(pyversion="2.7", py="27"),
PythonVersions(pyversion="3.5", py="35"),
PythonVersions(pyversion="3.6", py="36"),
PythonVersions(pyversion="3.7", py="37"),
PipelineEmvironment(pyversion, ansibleversion="2.4"),
PipelineEmvironment(pyversion, ansibleversion="2.5"),
PipelineEmvironment(pyversion, ansibleversion="2.6"),
PipelineEmvironment(pyversion, ansibleversion="2.7"),
],
};
local PipelineBuild = {
local PipelineBuild(depends_on=[]) = {
kind: "pipeline",
name: "build",
platform: {
@ -89,9 +91,7 @@ local PipelineBuild = {
},
},
],
depends_on: [
"testing",
],
depends_on: depends_on,
};
local PipelineNotifications = {
@ -123,7 +123,15 @@ local PipelineNotifications = {
};
[
PipelineTesting,
PipelineBuild,
PipelineTesting(pyversion="2.7"),
PipelineTesting(pyversion="3.5"),
PipelineTesting(pyversion="3.6"),
PipelineTesting(pyversion="3.7"),
PipelineBuild(depends_on=[
'python-2.7',
'python-3.5',
'python-3.6',
'python-3.7',
]),
PipelineNotifications,
]

View File

@ -1,45 +1,212 @@
---
kind: pipeline
name: testing
name: python-2.7
platform:
os: linux
arch: amd64
steps:
- name: python2.7
- name: ansible2.4
pull: always
image: python:2.7
commands:
- pip install tox -q
- "tox -e $(tox -l | grep py27 | xargs | sed 's/ /,/g') -q"
- pip install -q ansible~=2.4
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: python3.5
- name: ansible2.5
pull: always
image: python:2.7
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:2.7
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:2.7
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
---
kind: pipeline
name: python-3.5
platform:
os: linux
arch: amd64
steps:
- name: ansible2.4
pull: always
image: python:3.5
commands:
- pip install tox -q
- "tox -e $(tox -l | grep py35 | xargs | sed 's/ /,/g') -q"
- pip install -q ansible~=2.4
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: python3.6
- name: ansible2.5
pull: always
image: python:3.5
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:3.5
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:3.5
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
---
kind: pipeline
name: python-3.6
platform:
os: linux
arch: amd64
steps:
- name: ansible2.4
pull: always
image: python:3.6
commands:
- pip install tox -q
- "tox -e $(tox -l | grep py36 | xargs | sed 's/ /,/g') -q"
- pip install -q ansible~=2.4
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: python3.7
- name: ansible2.5
pull: always
image: python:3.6
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:3.6
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:3.6
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
---
kind: pipeline
name: python-3.7
platform:
os: linux
arch: amd64
steps:
- name: ansible2.4
pull: always
image: python:3.7
commands:
- pip install tox -q
- "tox -e $(tox -l | grep py37 | xargs | sed 's/ /,/g') -q"
- pip install -q ansible~=2.4
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.5
pull: always
image: python:3.7
commands:
- pip install -q ansible~=2.5
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.6
pull: always
image: python:3.7
commands:
- pip install -q ansible~=2.6
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
- name: ansible2.7
pull: always
image: python:3.7
commands:
- pip install -q ansible~=2.7
- pip install -q -r tests/requirements.txt
- pip install -q .
- ansible-later -c tests/config/config.ini tests/data/yaml_success.yml
depends_on:
- clone
@ -105,7 +272,10 @@ steps:
- tag
depends_on:
- testing
- python-2.7
- python-3.5
- python-3.6
- python-3.7
---
kind: pipeline

5
tests/requirements.txt Normal file
View File

@ -0,0 +1,5 @@
flake8
pep8-naming
wheel
flake8-colors
pytest