forked from StatCan/experimental_data_api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
55 lines (47 loc) · 978 Bytes
/
.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
image: alpine:latest
variables:
DOCKER_TLS_CERTDIR: ""
stages:
- test
- build
- deploy
lint:
stage: test
image: node
before_script:
- cd api
- npm install
script:
- npm run test-lint
unit:
stage: test
image: docker:stable
services:
- docker:stable-dind
script:
- apk add docker-compose --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
- setup_docker
- unit_test
build:
stage: build
image: docker:stable-git
services:
- docker:stable-dind
script:
- setup_docker
- build api "${CI_APPLICATION_REPOSITORY}"
- build db "${CI_APPLICATION_REPOSITORY}-db"
only:
- branches
deploy:
stage: deploy
image: octopusdeploy/octo
script:
- deploy
only:
refs:
- master
# ---------------------------------------------------------------------------
before_script:
- apk update && apk add git
- for script in .ci/*; do source $script; done