This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
forked from webkom/vote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
72 lines (71 loc) · 1.6 KB
/
.drone.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
pipeline:
setup:
image: node:13
when:
event:
- push
- pull_request
commands:
- yarn
# integration-tests:
# image: circleci/node:13-browsers
# when:
# event:
# - push
# - pull_request
# group: testing
# commands:
# # This image runs with a custom user (circleci)by default,
# # and chrome headless doesn't work for the root user.
# # --> Fix some file permissions before start
# - sudo su -c "mkdir -p /root/.config/yarn/"
# - sudo su -c "chown -R circleci:circleci ."
# - sudo su -c "chown -R circleci:circleci /root/"
# - MONGO_URL=mongodb://mongodb:27017/vote-integration-test REDIS_URL=redis HEADLESS=true yarn protractor
lint:
image: node:13
when:
event:
- push
- pull_request
group: testing
commands:
- yarn lint
test:
image: node:13
when:
event:
- push
- pull_request
group: testing
commands:
- MONGO_URL=mongodb://mongodb:27017/vote-test REDIS_URL=redis yarn mocha
build:
image: node:13
when:
event:
- push
- pull_request
branch:
exclude: [prod]
group: testing
commands:
- yarn build
docker:
image: plugins/docker
when:
branch:
- prod
event: push
status: success
repo: abakus/vote
secrets: [docker_username, docker_password]
tags:
- ${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:7}
build_args:
- RELEASE=${DRONE_BRANCH}-${DRONE_COMMIT_SHA:0:7}
services:
mongodb:
image: mongo:3.6
redis:
image: redis:latest