diff options
author | Matt Clay <matt@mystile.com> | 2016-09-20 16:53:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-20 16:53:51 -0700 |
commit | 072e89637c3a0963aa99fcaf63145603ee48eadd (patch) | |
tree | adb34b8e939f1c373b18dc5ddb402b877482f7ac | |
parent | d9e5e7669fbfa11649210fb2bd263a8de1e470e3 (diff) | |
download | ansible-modules-core-072e89637c3a0963aa99fcaf63145603ee48eadd.tar.gz |
Switch from Travis to Shippable for CI. (#4950)
-rw-r--r-- | .travis.yml | 22 | ||||
-rw-r--r-- | shippable.yml | 41 | ||||
-rwxr-xr-x | test-docs.sh | 21 | ||||
-rwxr-xr-x | test/utils/shippable/ci.sh | 7 | ||||
-rw-r--r-- | test/utils/shippable/sanity-skip-python24.txt | 1 | ||||
-rw-r--r-- | test/utils/shippable/sanity-test-python24.txt | 2 | ||||
-rwxr-xr-x | test/utils/shippable/sanity.sh | 21 |
7 files changed, 72 insertions, 43 deletions
diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f76217c9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -sudo: false -language: python -python: - - "2.7" -addons: - apt: - sources: - - deadsnakes - packages: - - python2.4 - - python2.6 -install: - - pip install git+https://github.com/ansible/ansible.git@stable-2.1#egg=ansible - - pip install git+https://github.com/sivel/ansible-testing.git#egg=ansible_testing -script: - - python2.4 -m compileall -fq -x 'cloud/' . - - python2.4 -m compileall -fq cloud/amazon/_ec2_ami_search.py cloud/amazon/ec2_facts.py - - python2.6 -m compileall -fq . - - python2.7 -m compileall -fq . - - ansible-validate-modules --exclude 'utilities/' . - #- ansible-validate-modules --exclude 'cloud/amazon/ec2_lc\.py|cloud/amazon/ec2_scaling_policy\.py|cloud/amazon/ec2_scaling_policy\.py|cloud/amazon/ec2_asg\.py|cloud/azure/azure\.py|packaging/os/rhn_register\.py|network/openswitch/ops_template\.py|system/hostname\.py|utilities/' . - #- ./test-docs.sh core diff --git a/shippable.yml b/shippable.yml new file mode 100644 index 00000000..c1206918 --- /dev/null +++ b/shippable.yml @@ -0,0 +1,41 @@ +language: python + +env: + matrix: + - TEST=none + +matrix: + exclude: + - env: TEST=none + include: + - env: TEST=sanity INSTALL_DEPS=1 +build: + pre_ci_boot: + options: "--privileged=false --net=bridge" + ci: + - test/utils/shippable/ci.sh + +integrations: + notifications: + - integrationName: email + type: email + on_success: never + on_failure: never + on_start: never + on_pull_request: never + - integrationName: irc + type: irc + recipients: + - "chat.freenode.net#ansible-notices" + on_success: change + on_failure: always + on_start: never + on_pull_request: always + - integrationName: slack + type: slack + recipients: + - "#shippable" + on_success: change + on_failure: always + on_start: never + on_pull_request: never diff --git a/test-docs.sh b/test-docs.sh deleted file mode 100755 index 76297fba..00000000 --- a/test-docs.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -set -x - -CHECKOUT_DIR=".ansible-checkout" -MOD_REPO="$1" - -# Hidden file to avoid the module_formatter recursing into the checkout -git clone https://github.com/ansible/ansible "$CHECKOUT_DIR" -cd "$CHECKOUT_DIR" -git submodule update --init -rm -rf "lib/ansible/modules/$MOD_REPO" -ln -s "$TRAVIS_BUILD_DIR/" "lib/ansible/modules/$MOD_REPO" - -pip install -U Jinja2 PyYAML setuptools six pycrypto sphinx - -. ./hacking/env-setup -PAGER=/bin/cat bin/ansible-doc -l -if [ $? -ne 0 ] ; then - exit $? -fi -make -C docsite diff --git a/test/utils/shippable/ci.sh b/test/utils/shippable/ci.sh new file mode 100755 index 00000000..5c0f847e --- /dev/null +++ b/test/utils/shippable/ci.sh @@ -0,0 +1,7 @@ +#!/bin/bash -eux + +set -o pipefail + +source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))") + +"${source_root}/test/utils/shippable/${TEST}.sh" 2>&1 | gawk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' diff --git a/test/utils/shippable/sanity-skip-python24.txt b/test/utils/shippable/sanity-skip-python24.txt new file mode 100644 index 00000000..1434a040 --- /dev/null +++ b/test/utils/shippable/sanity-skip-python24.txt @@ -0,0 +1 @@ +/cloud/ diff --git a/test/utils/shippable/sanity-test-python24.txt b/test/utils/shippable/sanity-test-python24.txt new file mode 100644 index 00000000..5ad993ee --- /dev/null +++ b/test/utils/shippable/sanity-test-python24.txt @@ -0,0 +1,2 @@ +cloud/amazon/_ec2_ami_search.py +cloud/amazon/ec2_facts.py diff --git a/test/utils/shippable/sanity.sh b/test/utils/shippable/sanity.sh new file mode 100755 index 00000000..6614ef08 --- /dev/null +++ b/test/utils/shippable/sanity.sh @@ -0,0 +1,21 @@ +#!/bin/bash -eux + +source_root=$(python -c "from os import path; print(path.abspath(path.join(path.dirname('$0'), '../../..')))") + +install_deps="${INSTALL_DEPS:-}" + +cd "${source_root}" + +if [ "${install_deps}" != "" ]; then + add-apt-repository ppa:fkrull/deadsnakes && apt-get update -qq && apt-get install python2.4 -qq + + pip install git+https://github.com/ansible/ansible.git@stable-2.1#egg=ansible + pip install git+https://github.com/sivel/ansible-testing.git#egg=ansible_testing +fi + +python2.4 -m compileall -fq -i "test/utils/shippable/sanity-test-python24.txt" +python2.4 -m compileall -fq -x "($(printf %s "$(< "test/utils/shippable/sanity-skip-python24.txt"))" | tr '\n' '|')" . +python2.6 -m compileall -fq . +python2.7 -m compileall -fq . + +ansible-validate-modules --exclude '/utilities/|/shippable(/|$)' . |