-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
39 lines (33 loc) · 1.11 KB
/
.travis.yml
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
sudo: required
dist: xenial
services:
- docker
env:
DRAFT_DIR: /home/idci/draft
before_install:
- docker --version
- docker pull martinthomson/i-d-template
script:
- docker run -d -v "$PWD:/tmp/draft" --tmpfs "$DRAFT_DIR:rw,exec" --name idci
martinthomson/i-d-template sleep 300
- docker exec idci cp -rn /tmp/draft /home/idci
- docker exec -w "$DRAFT_DIR" -e CI=true -e TRAVIS
-e TRAVIS_REPO_SLUG -e TRAVIS_BRANCH -e TRAVIS_TAG -e TRAVIS_PULL_REQUEST
idci make CLONE_ARGS='--reference /home/idci/git-reference'
- docker exec idci ls -l /home/idci/draft/lib
- if [ "${TRAVIS_TAG#draft-}" == "${TRAVIS_TAG}" ]; then
docker exec -w "$DRAFT_DIR" -e CI=true -e GH_TOKEN -e TRAVIS
-e TRAVIS_REPO_SLUG -e TRAVIS_BRANCH -e TRAVIS_TAG -e TRAVIS_PULL_REQUEST
idci make ghpages;
fi
deploy:
provider: script
script:
- docker exec -w "$DRAFT_DIR" -e CI=true -e GH_TOKEN -e TRAVIS
-e TRAVIS_REPO_SLUG -e TRAVIS_BRANCH -e TRAVIS_TAG -e TRAVIS_PULL_REQUEST
idci make upload
skip_cleanup: true
on:
tags: true
after_script:
- docker container rm -f idci