This repository has been archived by the owner on Mar 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
85 lines (80 loc) · 1.62 KB
/
.gitlab-ci.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
stages:
- test
- build
- deploy
variables:
DOCKER_DRIVER: overlay
test:
image: poder/archlinux:meteor
stage: test
services:
- name: mvertes/alpine-mongo
alias: mongo
tags:
- docker
only:
- dev
except:
- tags
variables:
MONGO_URL: 'mongodb://mongo/runner'
NODE_ENV: 'development'
TEST_BROWSER_DRIVER: 'nightmare'
TEST_PARALLEL: "1"
script:
- (cd src && meteor npm install --silent)
- (cd src && meteor npm run testci)
staging:
image: tmaier/dpl
stage: deploy
tags:
- heroku
only:
- dev
except:
- tags
environment:
name: stageing
url: https://qqwext.herokuapp.com
script:
- dpl --provider=heroku --app=qqwext --api-key=$HEROKU_API_KEY
build:
image: poder/archlinux:meteor
stage: build
tags:
- docker
only:
- master
except:
- tags
artifacts:
paths:
- dist/
variables:
NODE_ENV: 'development'
METEOR_ALLOW_SUPERUSER: 'true'
script:
- (cd src && meteor npm install --silent)
- (cd src && meteor build --directory ../dist --architecture=os.linux.x86_64 --server-only)
production:
image: docker:latest
stage: deploy
services:
- docker:dind
tags:
- docker
only:
- master
except:
- tags
dependencies:
- build
environment:
name: production
url: https://www.quienesquien.wiki
script:
- apk --no-cache add jq
- export VERSION=$(cat src/package.json | jq -r .version)
- docker login --username=$DOCKER_ID_USER --password=$DOCKER_ID_PASSWORD
- docker build -t poder/quienesquienwiki:$VERSION .
- docker push poder/quienesquienwiki:$VERSION