parent
92ec662c7f
commit
7f205259ca
@ -0,0 +1,74 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: master
|
||||||
|
steps:
|
||||||
|
- name: restore-cache
|
||||||
|
image: meltwater/drone-cache
|
||||||
|
settings:
|
||||||
|
backend: filesystem
|
||||||
|
restore: true
|
||||||
|
cache_key: node_modules-taskvue
|
||||||
|
archive_format: gzip
|
||||||
|
filesystem_cache_root: "/var/lib/cache"
|
||||||
|
mount:
|
||||||
|
- node_modules
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: "/var/lib/cache"
|
||||||
|
# Do stuff..
|
||||||
|
- name: install
|
||||||
|
image: node:14
|
||||||
|
commands:
|
||||||
|
- yarn install
|
||||||
|
- name: rebuild-cache
|
||||||
|
image: meltwater/drone-cache
|
||||||
|
settings:
|
||||||
|
backend: filesystem
|
||||||
|
rebuild: true
|
||||||
|
cache_key: node_modules-taskvue
|
||||||
|
archive_format: gzip
|
||||||
|
filesystem_cache_root: "/var/lib/cache"
|
||||||
|
mount:
|
||||||
|
- 'node_modules'
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: "/var/lib/cache"
|
||||||
|
# Do stuff..
|
||||||
|
- name: build
|
||||||
|
image: node:14
|
||||||
|
commands:
|
||||||
|
- yarn run build
|
||||||
|
- name: scp files
|
||||||
|
image: appleboy/drone-scp
|
||||||
|
settings:
|
||||||
|
host: 121.41.13.10
|
||||||
|
username:
|
||||||
|
from_secret: pro_user
|
||||||
|
password:
|
||||||
|
from_secret: pro_pass
|
||||||
|
port: 22
|
||||||
|
target: /data/data/wwwroot/sws.oa00.com
|
||||||
|
source: dist/*
|
||||||
|
- name: ssh
|
||||||
|
image: appleboy/drone-ssh
|
||||||
|
settings:
|
||||||
|
host: 121.41.13.10
|
||||||
|
username:
|
||||||
|
from_secret: pro_user
|
||||||
|
password:
|
||||||
|
from_secret: pro_pass
|
||||||
|
port: 22
|
||||||
|
script:
|
||||||
|
- cd /data/data/wwwroot/sws.oa00.com
|
||||||
|
- \cp -rf dist/* ./
|
||||||
|
- rm -rf dist
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
host:
|
||||||
|
path: "/tmp/cache"
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- merge
|
Loading…
Reference in new issue