Skip to content

Commit

Permalink
Add travis ci config files
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Jun 26, 2019
1 parent 3acacc9 commit 26ad45f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
language: bash
sudo: required
services:
- docker

# Installing a newer Docker version
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- docker version

script: ./travis-build.sh

after_failure:
- curl "https://api.day.app/${API_DAY_TOKEN}/dnmp-plus 构建失败"

after_success:
- curl "https://api.day.app/${API_DAY_TOKEN}/dnmp-plus 构建成功"

notifications:
email: false
18 changes: 18 additions & 0 deletions travis-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

#### halt script on error
set -xe

echo '##### Print docker version'
docker --version

echo '##### Print environment'
env | sort

#### Build the Docker Images

cp env-example .env
cat .env
cp docker-compose-sample.yml docker-compose.yml
docker-compose up -d
docker images

0 comments on commit 26ad45f

Please sign in to comment.