From ecfd5309fce6751600f0bdc2c315b89ebd4e4960 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Mon, 3 Jun 2019 12:14:26 +1000 Subject: [PATCH] DCD-386: Enable Bitbucket Pipelines testing with Molecule. --- bin/run-all-tests | 7 ++++++- bitbucket-pipelines.yml | 13 +++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 bitbucket-pipelines.yml diff --git a/bin/run-all-tests b/bin/run-all-tests index 9f1c442..a7077b5 100755 --- a/bin/run-all-tests +++ b/bin/run-all-tests @@ -2,9 +2,14 @@ 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 pushd `dirname $role` molecule test --all popd done - diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml new file mode 100644 index 0000000..6c91d66 --- /dev/null +++ b/bitbucket-pipelines.yml @@ -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