Sfoglia il codice sorgente

:poop: testing out module cache and deploy prep

tags/0.9.0
J 5 anni fa
parent
commit
fadeb6fa23
1 ha cambiato i file con 53 aggiunte e 3 eliminazioni
  1. 53
    3
      .drone.yml

+ 53
- 3
.drone.yml Vedi File

1
+---
2
+################
3
+# Build & Test #
4
+################
5
+
1
 kind: pipeline
6
 kind: pipeline
2
-name: default
7
+name: run_tests
3
 
8
 
4
 steps:
9
 steps:
10
+# Test the vue theme
5
 - name: test
11
 - name: test
6
   image: node
12
   image: node
7
   commands:
13
   commands:
8
   - cd ./vue-theme
14
   - cd ./vue-theme
9
   - npm install
15
   - npm install
10
   - npm test
16
   - npm test
17
+  volumes:
18
+  # Link node_modules cache from host filesystem into container at the expected location
19
+  - name: node_cache
20
+    path: ./vue-theme/node_modules
11
 
21
 
12
 - name: build
22
 - name: build
13
   image: node
23
   image: node
14
   commands:
24
   commands:
15
   - cd ./vue-theme
25
   - cd ./vue-theme
16
-  - npm install
17
-  - npm run build
26
+  - npm run build
27
+  volumes:
28
+    # Link node_modules cache from host filesystem into container at the expected location
29
+    - name: node_cache
30
+      path: ./vue-theme/node_modules
31
+
32
+volumes:
33
+  - name: node_cache
34
+    host:
35
+      path: /tmp/cache/drone/node_modules
36
+      
37
+---
38
+########################
39
+# Deploy to Production #
40
+########################
41
+
42
+kind: pipeline
43
+name: depluy
44
+depends_on:
45
+  # Must run after the first pipeline
46
+  - run_tests
47
+trigger:
48
+  status:
49
+    # Only runs if the first pipeline was fully successful
50
+    - success
51
+
52
+steps:
53
+# Test the vue theme
54
+- name: test
55
+  image: node
56
+  commands:
57
+  - pwd
58
+  - ls ./vue-theme/node_modules
59
+  volumes:
60
+  # Link node_modules cache from host filesystem into container at the expected location
61
+  - name: node_cache
62
+    path: ./vue-theme/node_modules
63
+
64
+volumes:
65
+  - name: node_cache
66
+    host:
67
+      path: /tmp/cache/drone/node_modules

Loading…
Annulla
Salva