diff --git a/.travis.yml b/.travis.yml index 1664256..d8efe84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,6 +31,22 @@ jobs: - docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION ansible --version - docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION /bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml" + - stage: Syntax check + env: + - ANSIBLE_VERSION="2.6" + script: + - echo "==> Syntax Check on Ansible $ANSIBLE_VERSION ..." + - docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION ansible --version + - docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION /bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml" + + - stage: Syntax check + env: + - ANSIBLE_VERSION="2.7" + script: + - echo "==> Syntax Check on Ansible $ANSIBLE_VERSION ..." + - docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION ansible --version + - docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION /bin/sh -c "cd /srv && ansible-playbook --syntax-check setup.yml" + # Stage of Lint check # =================== @@ -50,6 +66,22 @@ jobs: - docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION ansible --version - docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION /bin/sh -c "cd /srv && ansible-lint setup.yml" + - stage: Lint check + env: + - ANSIBLE_VERSION="2.6" + script: + - echo "==> Lint Check on Ansible $ANSIBLE_VERSION ..." + - docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION ansible --version + - docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION /bin/sh -c "cd /srv && ansible-lint setup.yml" + + - stage: Lint check + env: + - ANSIBLE_VERSION="2.7" + script: + - echo "==> Lint Check on Ansible $ANSIBLE_VERSION ..." + - docker run --rm -it chusiang/ansible:$ANSIBLE_VERSION ansible --version + - docker run --rm -it -v $PWD:/srv chusiang/ansible:$ANSIBLE_VERSION /bin/sh -c "cd /srv && ansible-lint setup.yml" + # Stage of Build # ==============