Kaynağa Gözat

:gear: omitting backend build step from drone

tags/0.0.1
toj 4 yıl önce
ebeveyn
işleme
20369924c0
1 değiştirilmiş dosya ile 52 ekleme ve 76 silme
  1. 52
    76
      .drone.yml

+ 52
- 76
.drone.yml Dosyayı Görüntüle

@@ -5,7 +5,6 @@
5 5
 
6 6
 # push_deploy_key: id_rsa from DRONE host machine
7 7
 
8
-
9 8
 ################
10 9
 # Build & Test #
11 10
 ################
@@ -14,35 +13,35 @@ kind: pipeline
14 13
 name: frontend_run_tests
15 14
 
16 15
 steps:
17
-# Test the vue frontend
18
-- name: test-frontend
19
-  image: node
20
-  commands:
21
-  - pwd
22
-  - cd ./frontend
23
-  - npm install
24
-  - npm test
25
-  volumes:
26
-  # Link node_modules cache from host filesystem into container at the expected location
27
-  - name: frontend_node_cache
28
-    path: /drone/src/frontend/node_modules
29
-
30
-- name: build-frontend
31
-  image: node
32
-  commands:
33
-  - cd ./frontend
34
-  - rm -Rf ./build/*
35
-  - npx browserslist@latest --update-db
36
-  - npm run build
37
-  - ls ./build
38
-  environment:
39
-    NODE_OPTIONS: --openssl-legacy-provider
40
-  volumes:
41
-    # Link node_modules cache from host filesystem into container at the expected location
42
-    - name: frontend_node_cache
43
-      path: /drone/src/frontend/node_modules
44
-    - name: frontend_build
45
-      path: /drone/src/frontend/build
16
+  # Test the vue frontend
17
+  - name: test-frontend
18
+    image: node
19
+    commands:
20
+      - pwd
21
+      - cd ./frontend
22
+      - npm install
23
+      - npm test
24
+    volumes:
25
+      # Link node_modules cache from host filesystem into container at the expected location
26
+      - name: frontend_node_cache
27
+        path: /drone/src/frontend/node_modules
28
+
29
+  - name: build-frontend
30
+    image: node
31
+    commands:
32
+      - cd ./frontend
33
+      - rm -Rf ./build/*
34
+      - npx browserslist@latest --update-db
35
+      - npm run build
36
+      - ls ./build
37
+    environment:
38
+      NODE_OPTIONS: --openssl-legacy-provider
39
+    volumes:
40
+      # Link node_modules cache from host filesystem into container at the expected location
41
+      - name: frontend_node_cache
42
+        path: /drone/src/frontend/node_modules
43
+      - name: frontend_build
44
+        path: /drone/src/frontend/build
46 45
 
47 46
 volumes:
48 47
   - name: frontend_node_cache
@@ -52,40 +51,22 @@ volumes:
52 51
     host:
53 52
       path: /tmp/cache/drone/frontend/build
54 53
 ---
55
-
56 54
 kind: pipeline
57 55
 name: backend_run_tests
58 56
 
59 57
 steps:
60
-# Test the vue frontend
61
-- name: test-backend
62
-  image: node
63
-  commands:
64
-  - pwd
65
-  - cd ./backend
66
-  - npm install
67
-  - npm test
68
-  volumes:
69
-  # Link node_modules cache from host filesystem into container at the expected location
70
-  - name: backend_node_cache
71
-    path: /drone/src/backend/node_modules
72
-
73
-- name: build-backend
74
-  image: node
75
-  commands:
76
-  - cd ./backend
77
-  - rm -Rf ./build/*
78
-  - npx browserslist@latest --update-db
79
-  - npm run build
80
-  - ls ./build
81
-  environment:
82
-    NODE_OPTIONS: --openssl-legacy-provider
83
-  volumes:
84
-    # Link node_modules cache from host filesystem into container at the expected location
85
-    - name: backend_node_cache
86
-      path: /drone/src/backend/node_modules
87
-    - name: backend_build
88
-      path: /drone/src/backend/build
58
+  # Test the vue frontend
59
+  - name: test-backend
60
+    image: node
61
+    commands:
62
+      - pwd
63
+      - cd ./backend
64
+      - npm install
65
+      - npm test
66
+    volumes:
67
+      # Link node_modules cache from host filesystem into container at the expected location
68
+      - name: backend_node_cache
69
+        path: /drone/src/backend/node_modules
89 70
 
90 71
 volumes:
91 72
   - name: backend_node_cache
@@ -95,8 +76,6 @@ volumes:
95 76
     host:
96 77
       path: /tmp/cache/drone/backend/build
97 78
 ---
98
-
99
-
100 79
 ########################
101 80
 # Deploy to Production #
102 81
 ########################
@@ -113,17 +92,17 @@ trigger:
113 92
     - success
114 93
 
115 94
 steps:
116
-# post-receive hook
117
-- name: push commit
118
-  image: appleboy/drone-git-push:0.2.0-linux-amd64
119
-  settings:
120
-    branch: master
121
-    remote: maeda@165.232.128.85:/opt/staging/siimee.git
122
-    remote_name: staging
123
-    force: true
124
-    ssh_key:
125
-      # !: id_rsa from DRONE machine
126
-      from_secret: push_deploy_key
95
+  # post-receive hook
96
+  - name: push commit
97
+    image: appleboy/drone-git-push:0.2.0-linux-amd64
98
+    settings:
99
+      branch: master
100
+      remote: maeda@165.232.128.85:/opt/staging/siimee.git
101
+      remote_name: staging
102
+      force: true
103
+      ssh_key:
104
+        # !: id_rsa from DRONE machine
105
+        from_secret: push_deploy_key
127 106
 
128 107
 volumes:
129 108
   - name: frontend_node_cache
@@ -135,6 +114,3 @@ volumes:
135 114
   - name: backend_node_cache
136 115
     host:
137 116
       path: /tmp/cache/drone/backend/node_modules
138
-  - name: backend_build
139
-    host:
140
-      path: /tmp/cache/drone/backend/build

Loading…
İptal
Kaydet