forked from erxes/erxes-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
114 lines (106 loc) · 2.32 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
pipeline:
ping:
image: mongo:3.6
commands:
- sleep 15
- mongo --host mongo
test:
image: erxes/runner:latest
environment:
- TEST_MONGO_URL=mongodb://mongo/test
commands:
- node -v
- npm -v
- yarn --version
- yarn install
- yarn lint
- mkdir src/private/xlsTemplateOutputs
- yarn test
build:
image: erxes/runner:latest
commands:
- apt-get update && apt-get install -y git
- git checkout $DRONE_COMMIT_BRANCH
- yarn build
when:
branch:
- master
- develop
event:
- push
build_tag:
image: erxes/runner:latest
commands:
- yarn build
- tar -zcf ${DRONE_REPO_NAME}_${DRONE_TAG}.tar.gz dist src .env.sample package.json yarn.lock db-migrate-store.js
when:
event:
- tag
github_prerelease:
image: plugins/github-release
secrets: [ github_token ]
prerelease: true
files:
- ${DRONE_REPO_NAME}_${DRONE_TAG}.tar.gz
checksum:
- sha256
when:
event:
- tag
ref:
include:
- "refs/tags/*rc*"
- "refs/tags/*alpha*"
- "refs/tags/*beta*"
github_release:
image: plugins/github-release
secrets: [ github_token ]
files:
- ${DRONE_REPO_NAME}_${DRONE_TAG}.tar.gz
checksum:
- sha256
when:
event:
- tag
ref:
include:
- "refs/tags/*"
exclude:
- "refs/tags/*rc*"
- "refs/tags/*alpha*"
- "refs/tags/*beta*"
docker_publish:
image: plugins/docker
repo: ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
dockerfile: Dockerfile
secrets:
- source: docker_hub_username
target: docker_username
- source: docker_hub_password
target: docker_password
tags:
- ${DRONE_BRANCH}
when:
branch:
- master
- develop
event:
- push
docker_publish_tag:
image: plugins/docker
repo: ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
dockerfile: Dockerfile
secrets:
- source: docker_hub_username
target: docker_username
- source: docker_hub_password
target: docker_password
tags:
- ${DRONE_TAG}
when:
event:
- tag
services:
mongo:
image: mongo:3.6
command: [--smallfiles]