Test node_modules caching
This commit is contained in:
30
.drone.yml
30
.drone.yml
@@ -7,7 +7,23 @@ platform:
|
|||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: /tmp/cache
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Load cached frontend packages
|
||||||
|
image: sinlead/drone-cache:1.0.0
|
||||||
|
settings:
|
||||||
|
action: load
|
||||||
|
key: yarn.lock
|
||||||
|
mount: node_modules
|
||||||
|
prefix: yarn-modules-seasoned
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
|
||||||
- name: Frontend install
|
- name: Frontend install
|
||||||
image: node:18.2.0
|
image: node:18.2.0
|
||||||
commands:
|
commands:
|
||||||
@@ -15,12 +31,20 @@ steps:
|
|||||||
- yarn --version
|
- yarn --version
|
||||||
- yarn
|
- yarn
|
||||||
|
|
||||||
|
- name: Cache frontend packages
|
||||||
|
image: sinlead/drone-cache:1.0.0
|
||||||
|
settings:
|
||||||
|
action: save
|
||||||
|
key: yarn.lock
|
||||||
|
mount: node_modules
|
||||||
|
prefix: yarn-modules-seasoned
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /cache
|
||||||
|
|
||||||
- name: Frontend build
|
- name: Frontend build
|
||||||
image: node:18.2.0
|
image: node:18.2.0
|
||||||
commands:
|
commands:
|
||||||
- node -v
|
|
||||||
- yarn --version
|
|
||||||
- yarn
|
|
||||||
- yarn build
|
- yarn build
|
||||||
environment:
|
environment:
|
||||||
ELASTIC:
|
ELASTIC:
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ Object.keys(process.env).forEach(key => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("WEBPACK variables:", variables, process.env);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: process.env.NODE_ENV,
|
mode: process.env.NODE_ENV,
|
||||||
context: publicPath,
|
context: publicPath,
|
||||||
|
|||||||
Reference in New Issue
Block a user