You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
6 months ago | |
---|---|---|
ansible-lint-rules | 4 years ago | |
.gitignore | 4 years ago | |
Dockerfile | 6 months ago | |
Makefile | 1 year ago | |
README.md | 6 months ago | |
entrypoint.sh | 1 year ago |
README.md
drone-molecule
Drone plugin for Molecule (Ansible testing framework)
Tips:
- You can use environment variables in
molecule.yml
and pass them from Drone usingenvironment
. - You can use Ansible
lookups
to read environment variables defined in Droneenvironment
section.
📓 Usage
- Execute
molecule test
on the ansible role. It uses a named volume to store molecule internal content so that you can run Molecule in multiple stages in the pipeline.
---
pipeline:
molecule:
image: sethmdoty/drone-ansible-molecule:latest
pull: true
task: test
environment:
- CI_UUID=_molecule_${DRONE_COMMIT_SHA}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- molecule_${DRONE_COMMIT_SHA}:/tmp
⚙️ Parameter Reference
task
A valid Molecule command (Example: lint
,create
, converge
, idempotence
, test
, ...)
🔰 Development
- Run the plugin directly from a built Docker image:
docker run -i \
-w /opt/molecule \
-v $(pwd):/opt/molecule \
-e PLUGIN_TASK=test \
-e PLUGIN_ESG_NAME=va-dsci--verity \
sethmdoty/drone-ansible-molecule:latest