-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
62 lines (54 loc) · 1.36 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
kind: pipeline
type: docker
name: ci
steps:
- name: "Install dependencies"
image: node:10
commands:
- cd brainkeeper
- npm install
- name: "Test & Coverage"
image: buildkite/puppeteer
commands:
- cd brainkeeper
- "npx ng test --browsers ChromeHeadlessNoSandbox --watch false --progress false --codeCoverage"
depends_on: [ "Install dependencies" ]
- name: "Upload to codecov"
image: plugins/codecov
settings:
token:
from_secret: codecov-token
depends_on: [ "Test & Coverage" ]
- name: "Lint"
image: node:10
commands:
- cd brainkeeper
- "npx ng lint"
depends_on: [ "Install dependencies" ]
- name: "Build"
image: node:10
commands:
- cd brainkeeper
- npm run build
depends_on: [ "Install dependencies" ]
when:
event: [ push ]
- name: "Docker tags"
image: alpine
commands:
- echo -n "n-${DRONE_BUILD_NUMBER},c-${DRONE_COMMIT_SHA}," > .tags
- if [ "${DRONE_BRANCH}" = "master" ]; then echo -n "latest" >> .tags; else echo -n "${DRONE_BRANCH}" >> .tags; fi;
- echo -n "tags are "; cat .tags ; echo
when:
event: [ push ]
- name: "Docker build & push"
image: plugins/docker
settings:
repo: hmbrainkeeper/frontend
username: hmbrainkeeper
password:
from_secret: hmbkdocker_password
dockerfile: brainkeeper/Dockerfile
depends_on: [ "Build", "Test & Coverage"]
when:
event: [ push ]