diff options
author | Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> | 2017-05-18 18:02:21 +0530 |
---|---|---|
committer | Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> | 2017-05-24 22:11:04 +0530 |
commit | e494a047a02e043e5143db13a3531a366f53ea0a (patch) | |
tree | fc0ce97b17d731155bdeb2b1b483553d5a4631b2 | |
parent | e0743a5e4d81b425cd289c685ffff5b3124d4252 (diff) | |
download | gluster-e494a047a02e043e5143db13a3531a366f53ea0a.tar.gz gluster-e494a047a02e043e5143db13a3531a366f53ea0a.tar.bz2 gluster-e494a047a02e043e5143db13a3531a366f53ea0a.tar.xz gluster-e494a047a02e043e5143db13a3531a366f53ea0a.zip |
Travis CI update and disabling dockerfile_lint
Travis now runs the test where it:
* Builds the Dockerfile
* Runs Docker image with required parameters
* Verifies the state of the container
Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com>
-rw-r--r-- | .travis.yml | 26 | ||||
-rwxr-xr-x | tests/Dockerfiletest/run_mask.sh (renamed from tests/Dockerfiletest/run.sh) | 0 | ||||
-rw-r--r-- | tests/README.md | 6 |
3 files changed, 24 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index 0badc89..88f5090 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,26 @@ addons: packages: - shellcheck +services: + - docker + before_install: -- sudo apt-get install -y -qq npm -- sudo add-apt-repository -y ppa:chris-lea/node.js -- sudo apt-get -y update -- sudo apt-get install -y nodejs -- sudo npm config set registry http://registry.npmjs.org/ -- sudo npm install -g npm -- sudo npm install -g dockerfile_lint +- sudo apt-get update +- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine +- docker build -t gluster/client ./gluster-client/ +- docker run -it --name client gluster/client rpm -qa | grep gluster +- docker build -t gluster/centos ./CentOS/ +- docker run -d --name gcentos --privileged gluster/centos +- sleep 10 +- docker exec -it gcentos systemctl is-active glusterd +- docker build -t gluster/fedora ./Fedora/ +- docker run -d --name gfedora --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro gluster/fedora +- sleep 10 +- docker exec -it gfedora systemctl is-active glusterd +- docker build -t gluster/swift ./gluster-object/CentOS/docker-gluster-swift/ +- docker run -d --name swift --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -e GLUSTER_VOLUMES=vol gluster/swift +- sleep 10 +- docker exec -it swift systemctl is-active swift-object script: - make test diff --git a/tests/Dockerfiletest/run.sh b/tests/Dockerfiletest/run_mask.sh index b82b810..b82b810 100755 --- a/tests/Dockerfiletest/run.sh +++ b/tests/Dockerfiletest/run_mask.sh diff --git a/tests/README.md b/tests/README.md index 501af35..2d825d4 100644 --- a/tests/README.md +++ b/tests/README.md @@ -22,10 +22,14 @@ Install with * `dnf install ShellCheck`, or * `apt-get install shellcheck` +## Travis CI +* dockerfile_lint has dependency problem, hence disabling it. +* Builds the docker image and does a basic test. +* Tests the shell script. + ## TODOs * Write more tests -* More elaborate basic tests - docker build, docker run of basic commands. * Write full functional tests to be run in vms. (like the atomic vagrant environment) |