From 2936284fedf9f00326ee04f97be93ca6602e8dd5 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 7 Sep 2018 15:01:36 -0400 Subject: [PATCH] Use generic names for container platform - Add Zuul config - Correct a few minor things in tox.ini - add ansible-requirements.txt - add .gitignore Change-Id: Iac67338a6cd9a088bc0fbf0b3e6baff448530878 --- .gitignore | 21 +++++++++++++++++++++ ansible-requirements.txt | 6 ++++++ cleanup-docker.yml | 9 --------- container-cleanup.yml | 9 +++++++++ fetch-logs.yml | 2 +- restart-service.yml | 2 +- setup.cfg | 2 +- tox.ini | 7 ++++--- zuul.d/layout.yaml | 12 ++++++++++++ 9 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 .gitignore create mode 100644 ansible-requirements.txt delete mode 100644 cleanup-docker.yml create mode 100644 container-cleanup.yml create mode 100644 zuul.d/layout.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..4856b1531 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +*.py[cod] + +# Testing cruft +.tox +.venv +*.egg* +egg +.coverage +cover +.tox +nosetests.xml +.testrepository +.venv + +# Editors +*~ +.*.swp +.*sw? + +# Playbook retry files +*.retry diff --git a/ansible-requirements.txt b/ansible-requirements.txt new file mode 100644 index 000000000..a1b68382f --- /dev/null +++ b/ansible-requirements.txt @@ -0,0 +1,6 @@ +# These are required here because ansible can't be in global-requirements due +# to licensing conflicts. But we sill need to be able to pull them in for +# lint checks and want to document these as ansible specific things that may +# be required for this repository. +ansible +ansible-lint diff --git a/cleanup-docker.yml b/cleanup-docker.yml deleted file mode 100644 index cd799fb7f..000000000 --- a/cleanup-docker.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Cleanup Docker - hosts: "{{ target_hosts | default('all') }}" - become: yes - - tasks: - - name: Cleanup unused Docker images, containers, and volumes - import_role: - name: openstack-ops - tasks_from: cleanup_docker.yml diff --git a/container-cleanup.yml b/container-cleanup.yml new file mode 100644 index 000000000..da720a893 --- /dev/null +++ b/container-cleanup.yml @@ -0,0 +1,9 @@ +- name: Cleanup container items + hosts: "{{ target_hosts | default('all') }}" + become: yes + + tasks: + - name: Cleanup unused images, containers, and volumes + import_role: + name: openstack-operations + tasks_from: container_cleanup.yml diff --git a/fetch-logs.yml b/fetch-logs.yml index 2cfa8f997..180a1051e 100644 --- a/fetch-logs.yml +++ b/fetch-logs.yml @@ -5,5 +5,5 @@ tasks: - name: Fetch logs from remote systems import_role: - name: openstack-ops + name: openstack-operations tasks_from: fetch_logs.yml diff --git a/restart-service.yml b/restart-service.yml index 6040498bf..5f073745a 100644 --- a/restart-service.yml +++ b/restart-service.yml @@ -5,5 +5,5 @@ tasks: - name: Restart services import_role: - name: openstack-ops + name: openstack-operations tasks_from: restart_service.yml diff --git a/setup.cfg b/setup.cfg index 9508887f9..391ec71b4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ name = tripleo-ansible summary = TripleO Ansible - Ansible playbooks for the TripleO project. description-file = - README.md + README.rst author = TripleO Team author-email = jillr@redhat.com home-page = https://git.openstack.org/cgit/openstack/tripleo-ansible diff --git a/tox.ini b/tox.ini index 0937984ae..894ca445b 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ skipdist = True usedevelop = True install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/test-requirements.txt +deps = -r {toxinidir}/test-requirements.txt whitelist_externals = bash [testenv:bindep] @@ -34,13 +34,14 @@ commands = [testenv:ansible-lint] basepython=python2 +deps = -r {toxinidir}/ansible-requirements.txt commands = bash ci-scripts/ansible-lint.sh [testenv:linters] deps = - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/ansible-requirements.txt + -r {toxinidir}/test-requirements.txt + -r {toxinidir}/ansible-requirements.txt commands = {[testenv:pep8]commands} {[testenv:ansible-lint]commands} diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml new file mode 100644 index 000000000..c55d26eab --- /dev/null +++ b/zuul.d/layout.yaml @@ -0,0 +1,12 @@ +- project: + templates: + - release-openstack-server + check: + jobs: + - openstack-tox-linters + gate: + jobs: + - openstack-tox-linters + post: + jobs: + - publish-openstack-python-branch-tarball