Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 820 Bytes

TESTING.md

File metadata and controls

29 lines (25 loc) · 820 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/kitos9112/$(basename $(pwd)):z \
  --volume /var/run/docker.sock:/var/run/docker.sock:z \
  --tty --interactive --env \
  command="lint" \
  --env GITHUB_REPOSITORY="kitos9112/$(basename  $(pwd))" \
  --env ANSIBLE_ROLES_PATH="../" \
  ${docker_hash}
  1. Try role:
docker run --privileged \
  --volume $(pwd):/github/workspace/kitos9112/$(basename $(pwd)):z \
  --volume /var/run/docker.sock:/var/run/docker.sock:z \
  --tty --interactive \
  --env GITHUB_REPOSITORY="kitos9112/$(basename $(pwd))" \
  --env ANSIBLE_ROLES_PATH="../" \
  ${docker_hash}