Drone plugin for Molecule (Ansible testing framework)
 
 
 
 
Go to file
Seth Doty 7b62f899f6
update readme
2022-10-11 18:42:04 -05:00
ansible-lint-rules Adding mitogen plus version lock pytest 2018-11-07 01:58:14 -08:00
.gitignore Adding mitogen plus version lock pytest 2018-11-07 01:58:14 -08:00
Dockerfile add pytest ansible 2022-10-11 18:36:51 -05:00
Makefile Upgrade 2.6.8 2022-03-14 00:53:23 -07:00
README.md update readme 2022-10-11 18:42:04 -05:00
entrypoint.sh Upgrade 2.6.8 2022-03-14 00:53:23 -07:00

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 using environment.
  • You can use Ansible lookups to read environment variables defined in Drone environment 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