issue #164: arrange for DebOps common.yml to run under Travis.
This commit is contained in:
parent
38311336e1
commit
de5028ac18
|
@ -9,11 +9,15 @@ cache: pip
|
|||
python:
|
||||
- "2.7"
|
||||
|
||||
env:
|
||||
- MODE=mitogen
|
||||
- MODE=debops
|
||||
|
||||
install:
|
||||
- pip install -r dev_requirements.txt
|
||||
|
||||
script:
|
||||
- MITOGEN_LOG_LEVEL=debug PYTHONPATH=. ${TRAVIS_BUILD_DIR}/test
|
||||
- ${TRAVIS_BUILD_DIR}/.travis/${MODE}_tests.sh
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/bash -ex
|
||||
# Run some invocations of DebOps.
|
||||
|
||||
TMPDIR="/tmp/debops-$$"
|
||||
TRAVIS_BUILD_DIR="${TRAVIS_BUILD_DIR:-`pwd`}"
|
||||
|
||||
function on_exit()
|
||||
{
|
||||
[ "$KEEP" ] || {
|
||||
rm -rvf "$TMPDIR" || true
|
||||
docker kill target || true
|
||||
}
|
||||
}
|
||||
|
||||
trap on_exit EXIT
|
||||
mkdir "$TMPDIR"
|
||||
|
||||
docker run --rm --detach --name=target d2mw/mitogen-test /bin/sleep 86400
|
||||
|
||||
pip install -U debops==0.7.2 ansible==2.4.3.0
|
||||
debops-init "$TMPDIR/project"
|
||||
cd "$TMPDIR/project"
|
||||
|
||||
cat > .debops.cfg <<-EOF
|
||||
[ansible defaults]
|
||||
strategy_plugins = ${TRAVIS_BUILD_DIR}/ansible_mitogen/plugins/strategy
|
||||
strategy = mitogen_linear
|
||||
EOF
|
||||
|
||||
cat >> ansible/inventory/hosts <<-EOF
|
||||
target ansible_python_interpreter=/usr/bin/python2.7 ansible_connection=docker
|
||||
EOF
|
||||
|
||||
debops common
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash -ex
|
||||
# Run the Mitogen tests.
|
||||
|
||||
MITOGEN_LOG_LEVEL=debug PYTHONPATH=. ${TRAVIS_BUILD_DIR}/test
|
Loading…
Reference in New Issue