forked from YuMS/gitlab-ce-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (26 loc) · 1.69 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
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
- docker run --name gitlab-ce-pages-relative-url -d --restart=always --env 'PAGE_PRIVATE_TOKEN=private_token_of_peeking_account' --env 'RELATIVE_URL=pages' --env 'GITLAB_URL=http://localhost/' --env 'PROJECT_ROOT=public' --volume /tmp/gitlab-ce-pages-relative-url/public:/home/pages/public/ --volume /tmp/gitlab-ce-pages-relative-url/cname/:/home/pages/cname -p 8001:80 yums/gitlab-ce-pages
- sudo chmod -R 777 /tmp/gitlab-ce-pages/
- sudo chmod -R 777 /tmp/gitlab-ce-pages-relative-url/
- 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
- kill %1
- docker logs -f gitlab-ce-pages-relative-url &
- GITLAB_CE_PAGES_PUBLIC_VOLUME=/tmp/gitlab-ce-pages-relative-url/public/ GITLAB_CE_PAGES_CNAME_VOLUME=/tmp/gitlab-ce-pages-relative-url/cname/ GITLAB_CE_PAGES_PORT=8001 WEBHOOK_URL=http://localhost:8001/pages npm run system_test