Loading Jenkinsfile 0 → 100644 +38 −0 Original line number Diff line number Diff line /* Jenkins pipeline for testing an Ansible role. Required software on the agent: - Python 2.7. - Tox. - Vagrant. - Virtualbox. */ pipeline { agent any environment { VBOX_HWVIRTEX = off } stages { stage('install') { steps { sh 'git submodule update --init --recursive' } } stage('test') { steps { parallel ( 'pre-commit': { sh 'tox -e pre-commit' } 'molecule': { sh 'tox' } ) } } } post { success { sh 'tox -e import' } } } tox.ini +5 −0 Original line number Diff line number Diff line Loading @@ -24,3 +24,8 @@ commands = sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles" molecule dependency pre-commit run --all-files [testenv:import] envdir = {toxinidir}/.tox/molecule deps = -rtests/requirements.txt commands = ansible-galaxy import -v Loading
Jenkinsfile 0 → 100644 +38 −0 Original line number Diff line number Diff line /* Jenkins pipeline for testing an Ansible role. Required software on the agent: - Python 2.7. - Tox. - Vagrant. - Virtualbox. */ pipeline { agent any environment { VBOX_HWVIRTEX = off } stages { stage('install') { steps { sh 'git submodule update --init --recursive' } } stage('test') { steps { parallel ( 'pre-commit': { sh 'tox -e pre-commit' } 'molecule': { sh 'tox' } ) } } } post { success { sh 'tox -e import' } } }
tox.ini +5 −0 Original line number Diff line number Diff line Loading @@ -24,3 +24,8 @@ commands = sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles" molecule dependency pre-commit run --all-files [testenv:import] envdir = {toxinidir}/.tox/molecule deps = -rtests/requirements.txt commands = ansible-galaxy import -v