Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 816 Bytes

TESTING.md

File metadata and controls

31 lines (27 loc) · 816 Bytes

Testing

To test the container before publication, run these steps.

  1. docker_hash=$(docker build . -q).
  2. Go to a role-directory, like ansible-role-example.
  3. Try lint:
docker run --privileged \
  --volume $(pwd):/github/workspace/buluma/$(basename $(pwd)):z \
  --volume /var/run/docker.sock:/var/run/docker.sock:z \
  --tty \
  --interactive \
  --env command="lint" \
  --env GITHUB_REPOSITORY="buluma/$(basename  $(pwd))" \
  --env ANSIBLE_ROLES_PATH="../" \
  ${docker_hash}
  1. Try role:
docker run --privileged \
  --volume $(pwd):/github/workspace/buluma/$(basename $(pwd)):z \
  --volume /var/run/docker.sock:/var/run/docker.sock:z \
  --tty \
  --interactive \
  --env GITHUB_REPOSITORY="buluma/$(basename $(pwd))" \
  --env ANSIBLE_ROLES_PATH="../" \
  ${docker_hash}