--- ################ # 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: /drone/src/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: /drone/src/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: /drone/src/vue-theme/node_modules volumes: - name: node_cache host: path: /tmp/cache/drone/node_modules