| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- ---
- ################
- # Build & Test #
- ################
-
- kind: pipeline
- name: run_tests
-
- steps:
- # Test the vue theme
- - name: test
- image: node
- commands:
- - pwd
- - cd ./vue-theme
- - npm install
- - npm test
- volumes:
- # Link node_modules cache from host filesystem into container at the expected location
- - name: node_cache
- path: /vue-theme/node_modules
-
- - name: build
- image: node
- commands:
- - cd ./vue-theme
- - npm run build
- volumes:
- # Link node_modules cache from host filesystem into container at the expected location
- - name: node_cache
- path: /vue-theme/node_modules
-
- volumes:
- - name: node_cache
- host:
- path: /tmp/cache/drone/node_modules
-
- ---
- ########################
- # Deploy to Production #
- ########################
-
- kind: pipeline
- name: deploy
- depends_on:
- # Must run after the first pipeline
- - run_tests
- trigger:
- status:
- # Only runs if the first pipeline was fully successful
- - success
-
- steps:
- # Test the vue theme
- - name: test
- image: node
- commands:
- - pwd
- - ls ./vue-theme/node_modules
- volumes:
- # Link node_modules cache from host filesystem into container at the expected location
- - name: node_cache
- path: /vue-theme/node_modules
-
- volumes:
- - name: node_cache
- host:
- path: /tmp/cache/drone/node_modules
|