Skip to content

Commit

Permalink
Updated ansible version and tweaked logic for checking whether Docker is
Browse files Browse the repository at this point in the history
ready
  • Loading branch information
nuwang committed Dec 14, 2017
1 parent 6425596 commit a90b54d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ before_install:
- docker info

install:
# Install Ansible. # TODO: install from pypi when https://github.com/ansible/ansible/issues/15915 has been released
- git clone --recursive -b stable-2.1 https://github.com/ansible/ansible
- pip install ansible/
- pip install ansible

# Add ansible.cfg to pick up roles path.
- printf '[defaults]\nroles_path = ../' > ansible.cfg
Expand All @@ -25,8 +23,6 @@ install:
# Wait for web server port to come up
- ansible localhost -c local -m wait_for -a "port=8080 delay=5 state=started timeout=150"

# Wait for Galaxy to respond
- ansible localhost -c local -m uri -a "url=http://localhost:8080/ register=result until='result.status[0] in [\"2\", \"3\"]' retries=50 delay=3 ignore_error=True"
script:
# Check the role works in the test playbook.
- ansible-playbook -i "localhost," -c local -e galaxy_tools_galaxy_instance_url=http://127.0.0.1:8080 -e galaxy_runs_in_docker=yes -e galaxy_tools_api_key=admin test_playbook.yml
8 changes: 8 additions & 0 deletions tests/test_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
vars:
galaxy_tools_ignore_errors: False
galaxy_tools_tool_list_files: [ "files/tool_list.yaml.sample" ]
pre_tasks:
- name: Make sure Galaxy is ready before running tests
uri: url="http://localhost:8080/" state=present
register: result
until: result.status in ['200', '403']
retries: 50
delay: 3
ignore_errors: True
roles:
- ansible-galaxy-tools

0 comments on commit a90b54d

Please sign in to comment.