Selaa lähdekoodia

:gear: even more judicious drone build instructions

tags/1.0.3
J 3 vuotta sitten
vanhempi
commit
8ebf5eed18
1 muutettua tiedostoa jossa 29 lisäystä ja 6 poistoa
  1. 29
    6
      .drone.yml

+ 29
- 6
.drone.yml Näytä tiedosto

5
 
5
 
6
 # push_deploy_key: id_rsa from DRONE host machine
6
 # push_deploy_key: id_rsa from DRONE host machine
7
 
7
 
8
-################
9
-# Build & Test #
10
-################
11
-
8
+##############
9
+# Test Theme #
10
+##############
12
 kind: pipeline
11
 kind: pipeline
13
 name: run_tests
12
 name: run_tests
14
 
13
 
26
           - name: node_cache
25
           - name: node_cache
27
             path: /drone/src/vue-theme/node_modules
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
     - name: build
53
     - name: build
30
       image: node
54
       image: node
31
       commands:
55
       commands:
54
 ########################
78
 ########################
55
 # Deploy to Production #
79
 # Deploy to Production #
56
 ########################
80
 ########################
57
-
58
 kind: pipeline
81
 kind: pipeline
59
 name: deploy
82
 name: deploy
60
 depends_on:
83
 depends_on:
61
     # Must run after the first pipeline
84
     # Must run after the first pipeline
62
-    - run_tests
85
+    - run_build
63
 trigger:
86
 trigger:
64
     status:
87
     status:
65
         # Only runs if the first pipeline was fully successful
88
         # Only runs if the first pipeline was fully successful

Loading…
Peruuta
Tallenna