DCD-386: Enable Bitbucket Pipelines testing with Molecule.

This commit is contained in:
Steve Smith
2019-06-03 12:14:26 +10:00
parent adeb027473
commit ecfd5309fc
2 changed files with 19 additions and 1 deletions

View File

@@ -2,9 +2,14 @@
set -e set -e
# Use Ansible from virtualenv if provided
if [[ -f .venv/bin/ansible ]]; then
source .venv/bin/activate
pip install molecule docker
fi
for role in `find roles/ -name molecule`; do for role in `find roles/ -name molecule`; do
pushd `dirname $role` pushd `dirname $role`
molecule test --all molecule test --all
popd popd
done done

13
bitbucket-pipelines.yml Normal file
View File

@@ -0,0 +1,13 @@
---
image: atlassian/default-image:2
pipelines:
default:
- step:
services:
- docker
script:
- apt-get update && apt-get install -y virtualenv python-dev
- ./bin/install-ansible
- ./bin/run-all-tests