|
|
@@ -5,10 +5,9 @@
|
|
5
|
5
|
|
|
6
|
6
|
# push_deploy_key: id_rsa from DRONE host machine
|
|
7
|
7
|
|
|
8
|
|
-################
|
|
9
|
|
-# Build & Test #
|
|
10
|
|
-################
|
|
11
|
|
-
|
|
|
8
|
+##############
|
|
|
9
|
+# Test Theme #
|
|
|
10
|
+##############
|
|
12
|
11
|
kind: pipeline
|
|
13
|
12
|
name: run_tests
|
|
14
|
13
|
|
|
|
@@ -26,6 +25,31 @@ steps:
|
|
26
|
25
|
- name: node_cache
|
|
27
|
26
|
path: /drone/src/vue-theme/node_modules
|
|
28
|
27
|
|
|
|
28
|
+volumes:
|
|
|
29
|
+ - name: node_cache
|
|
|
30
|
+ host:
|
|
|
31
|
+ path: /tmp/cache/drone/node_modules
|
|
|
32
|
+ - name: build
|
|
|
33
|
+ host:
|
|
|
34
|
+ path: /tmp/cache/drone/build
|
|
|
35
|
+---
|
|
|
36
|
+#############
|
|
|
37
|
+# Run Build #
|
|
|
38
|
+#############
|
|
|
39
|
+kind: pipeline
|
|
|
40
|
+name: run_build
|
|
|
41
|
+depends_on:
|
|
|
42
|
+ # Must run after the first pipeline
|
|
|
43
|
+ - run_tests
|
|
|
44
|
+trigger:
|
|
|
45
|
+ status:
|
|
|
46
|
+ # Only runs if the first pipeline was fully successful
|
|
|
47
|
+ - success
|
|
|
48
|
+ # Only runs on the master branch
|
|
|
49
|
+ branch:
|
|
|
50
|
+ - dev
|
|
|
51
|
+
|
|
|
52
|
+steps:
|
|
29
|
53
|
- name: build
|
|
30
|
54
|
image: node
|
|
31
|
55
|
commands:
|
|
|
@@ -54,12 +78,11 @@ volumes:
|
|
54
|
78
|
########################
|
|
55
|
79
|
# Deploy to Production #
|
|
56
|
80
|
########################
|
|
57
|
|
-
|
|
58
|
81
|
kind: pipeline
|
|
59
|
82
|
name: deploy
|
|
60
|
83
|
depends_on:
|
|
61
|
84
|
# Must run after the first pipeline
|
|
62
|
|
- - run_tests
|
|
|
85
|
+ - run_build
|
|
63
|
86
|
trigger:
|
|
64
|
87
|
status:
|
|
65
|
88
|
# Only runs if the first pipeline was fully successful
|