This repository has been archived by the owner on Oct 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
88 lines (80 loc) · 1.88 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pipeline:
restore-cache:
image: drillster/drone-volume-cache
pull: true
when:
event: [push, pull_request, tag, deployment]
restore: true
mount:
- ./node_modules
volumes:
- /tmp/cache:/cache
setup:
image: node:boron
when:
event: [push, pull_request, tag, deployment]
commands:
- yarn
build:
image: node:boron
group: testing
when:
event: [push, pull_request, tag, deployment]
commands:
- npm run build:prod
test:
image: node:boron
group: testing
secrets: [codecov_token]
environment:
SDF_DATABASE_URL: "mongodb://127.0.0.1:27017"
when:
event: [push, pull_request, tag, deployment]
commands:
- yarn test
- yarn codecov
lint:
image: node:boron
group: testing
when:
event: [push, pull_request, tag, deployment]
commands:
- npm run lint
rebuild-cache:
image: drillster/drone-volume-cache
pull: true
when:
event: [push, pull_request, tag, deployment]
rebuild: true
mount:
- ./node_modules
volumes:
- /tmp/cache:/cache
release:
image: plugins/docker
secrets: [docker_username, docker_password, sdf_sentry_dsn_frontend]
when:
event: tag
status: success
repo: registry.online.ntnu.no/dotkom/super-duper-fiesta
registry: registry.online.ntnu.no
dockerfile: Dockerfile.prod
build_args_from_env: [sdf_sentry_dsn_frontend]
tags:
- "${DRONE_TAG}"
- latest
deploy:
image: appleboy/drone-ssh
pull: true
secrets: [ssh_key]
host: nansen.online.ntnu.no
port: 22
username: root
key: ${SSH_KEY}
command_timeout: 600s
when:
event: tag
status: success
script:
- /usr/bin/docker pull registry.online.ntnu.no/dotkom/super-duper-fiesta:latest
- /bin/systemctl restart super-duper-fiesta.service