Skip to content

Commit

Permalink
Try integrate the Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chusiang committed Jan 4, 2018
1 parent 75ccff4 commit 55b194c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: bash
sudo: true
services:
- docker

before_install:
- docker info
- docker version
- echo "==> Build with Docker ..."
- docker build -f tests/Dockerfile.ubuntu16.04 -t chrony:ubuntu16.04 . | tee tests/output.ubuntu16.04.log
- docker build -f tests/Dockerfile.centos7 -t chrony:centos7 . | tee tests/output.centos7.log

script:
- echo "==> Run Test case ..."
- grep 'chronyc (chrony) version' tests/output.ubuntu16.04.log
- grep 'chronyc (chrony) version' tests/output.centos7.log

notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

8 changes: 8 additions & 0 deletions tests/Dockerfile.centos7
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Dockerfile for building image that contains software stack provisioned by Ansible.

FROM williamyeh/ansible:centos7-onbuild
MAINTAINER Chu-Siang Lai <chusiang.lai@gmail.com>

# run.
ENV PLAYBOOK provision.yml
RUN ansible-playbook-wrapper -vvv
15 changes: 15 additions & 0 deletions tests/Dockerfile.ubuntu16.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Dockerfile for building image that contains software stack provisioned by Ansible.

FROM williamyeh/ansible:ubuntu16.04-onbuild
MAINTAINER Chu-Siang Lai <chusiang.lai@gmail.com>

# init.
#
# fix policy-rc.d for Docker
# @see http://www.monblocnotes.com/node/2057
# @see http://askubuntu.com/a/365912
RUN sed -i -e 's/exit\s\s*101/exit 0/' /usr/sbin/policy-rc.d

# run.
ENV PLAYBOOK provision.yml
RUN ansible-playbook-wrapper -vvv

0 comments on commit 55b194c

Please sign in to comment.