Bläddra i källkod

:gear: rolling back to simple test drone file

tags/0.0.1^2
j 3 år sedan
förälder
incheckning
01cfd2d1fd
1 ändrade filer med 13 tillägg och 121 borttagningar
  1. 13
    121
      .drone.yml

+ 13
- 121
.drone.yml Visa fil

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

Laddar…
Avbryt
Spara