This repository was archived by the owner on Oct 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
45 lines (40 loc) · 1.36 KB
/
.travis.yml
File metadata and controls
45 lines (40 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
language: python
dist: trusty
sudo: required
python:
- "3.5"
services:
- docker
# Need to install ansible from apt,
# but ansible-container from GitHub
install:
- sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe'
- sudo apt update -qq
- sudo apt install -y ansible
- ansible --version
- git clone https://github.com/ansible/ansible-container.git ~/workspace/ansible-container
- python3 -m venv ~/python3-venv/ansible
- source ~/python3-venv/ansible/bin/activate &&
pip3 install -U pip &&
pip3 install -r requirements.txt &&
pip3 install -e ~/workspace/ansible-container[docker] &&
ansible-container version
script:
# Docker build take a long time while downloading KNP.
# To make it worse, ansible doesn't show debug log
# before the task finishes. For now TravisCI will
# kill the build process after waiting for a while when
# ansible download KNP. There is no way to help :(
- source ~/python3-venv/ansible/bin/activate &&
ansible-container build
- docker tag nlp-doc2vec:latest vochicong/nlp-doc2vec:latest
after_success:
- docker login -u vochicong -p "$DOCKER_PASSWORD";
docker push vochicong/nlp-doc2vec:latest
notifications:
webhooks:
urls:
- NOTIFY_WEBHOOK_URL
on_success: change
on_failure: always
on_start: never # options: [always|never|change]