Add gate config

This patch adds gerrit configuration as well as an
ansible-lint gate job.

Change-Id: I1585516e8caf5db82cbab6fd34e29c9fc219f85f
This commit is contained in:
Douglas Mendizábal 2019-03-05 11:32:24 -06:00
parent 369ac53a5a
commit 3076482fda
7 changed files with 49 additions and 21 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.tox/

4
.gitreview Normal file
View File

@ -0,0 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/ansible-role-thales-hsm.git

View File

@ -39,7 +39,7 @@
args:
creates: /opt/nfast/sbin/install
- name: run installer
- name: run installer # noqa 306
shell: echo "1" | /opt/nfast/sbin/install
args:
creates: /opt/nfast/kmdata

View File

@ -5,7 +5,7 @@
script: "{{ role_path }}/files/add_ips.py --config-dir /opt/nfast/kmdata/{{ thales_hsm_config_location }}/config --ips {{ thales_client_ips }}"
- name: push new config to the HSM and check that it was successful
shell: "/opt/nfast/bin/cfg-pushnethsm -a {{thales_hsm_ip_address}} /opt/nfast/kmdata/{{thales_hsm_config_location}}/config/config.new && sleep 5 && diff /opt/nfast/kmdata/{{thales_hsm_config_location}}/config/config /opt/nfast/kmdata/{{thales_hsm_config_location}}/config/config.new"
shell: "/opt/nfast/bin/cfg-pushnethsm -a {{ thales_hsm_ip_address }} /opt/nfast/kmdata/{{ thales_hsm_config_location }}/config/config.new && sleep 5 && diff /opt/nfast/kmdata/{{ thales_hsm_config_location }}/config/config /opt/nfast/kmdata/{{ thales_hsm_config_location }}/config/config.new" # noqa 204
register: result
until: result.rc == 0
retries: 10

1
test-requirements.txt Normal file
View File

@ -0,0 +1 @@
ansible-lint

11
tox.ini Normal file
View File

@ -0,0 +1,11 @@
[tox]
minversion = 2.0
envlist = linters
skipdist = true
[testenv]
deps = -r{toxinidir}/test-requirements.txt
[testenv:linters]
# TODO(redrobot): Don't ignore 301
commands = ansible-lint -x 301 {toxinidir}

11
zuul.d/layout.yaml Normal file
View File

@ -0,0 +1,11 @@
---
- project:
check:
jobs:
- openstack-tox-linters
gate:
jobs:
- openstack-tox-linters
post:
jobs:
- publish-openstack-python-branch-tarball