forked from YuMS/gitlab-ce-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
26 lines (21 loc) · 991 Bytes
/
.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
sudo: required
language: node_js
node_js:
- "6"
services:
- docker
addons:
hosts:
- example1.com
- example2.com
before_install:
- docker build -t yums/gitlab-ce-pages .
- docker run --name gitlab-ce-pages -d --restart=always --env 'PAGE_PRIVATE_TOKEN=private_token_of_peeking_account' --env 'GITLAB_URL=http://localhost/' --env 'PROJECT_ROOT=public' --volume /tmp/gitlab-ce-pages/public:/home/pages/public/ --volume /tmp/gitlab-ce-pages/cname/:/home/pages/cname -p 8000:80 yums/gitlab-ce-pages
- sudo chmod -R 777 /tmp/gitlab-ce-pages/
- docker ps -a
- cd src
- npm install
script:
- docker logs -f gitlab-ce-pages &
- docker exec gitlab-ce-pages /bin/sh -c "PROJECT_ROOT=public GITLAB_CE_PAGES_PUBLIC_DIR=public PAGE_PRIVATE_TOKEN=private_token npm test"
- GITLAB_CE_PAGES_PUBLIC_VOLUME=/tmp/gitlab-ce-pages/public/ GITLAB_CE_PAGES_CNAME_VOLUME=/tmp/gitlab-ce-pages/cname/ GITLAB_CE_PAGES_PORT=8000 WEBHOOK_URL=http://localhost:8000 npm run system_test