Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sivel
Created April 19, 2016 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sivel/1db826cb21bfaea96484e7194c30f9c8 to your computer and use it in GitHub Desktop.
Save sivel/1db826cb21bfaea96484e7194c30f9c8 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
TARGET=${1:-"ubuntu1404"}
if [[ "$TARGET" =~ centos7|fedora ]]
then
TARGET_OPTIONS="--volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
fi
docker pull ansible/ansible:${TARGET}
CONTAINER=`docker run -d -e "TEST_FLAGS=${TEST_FLAGS}" -e "LC_ALL=en_US.utf-8" ${TARGET_OPTIONS} ansible/ansible:${TARGET}`
docker cp `pwd` ${CONTAINER}:/root/ansible
docker exec -ti ${CONTAINER} /bin/sh -c "cd /root/ansible; . hacking/env-setup; cd test/integration; ls; make"
docker rm -f ${CONTAINER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment