71 lines
1.3 KiB
YAML
71 lines
1.3 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: vue-admin
|
|
|
|
trigger:
|
|
branch: ci
|
|
|
|
steps:
|
|
- name: restore-modules
|
|
image: drillster/drone-volume-cache
|
|
volumes:
|
|
- name: modules
|
|
path: /cache
|
|
settings:
|
|
restore: true
|
|
mount:
|
|
- ./node_modules
|
|
- ./yarn.lock
|
|
|
|
- name: build
|
|
image: node:12.16.1
|
|
commands:
|
|
- ls -l | grep node_modules
|
|
- cd node_modules
|
|
- ls -l
|
|
- yarn
|
|
- yarn build:prod
|
|
- docker -v
|
|
|
|
- name: rebuild-modules
|
|
image: drillster/drone-volume-cache
|
|
volumes:
|
|
- name: modules
|
|
path: /cache
|
|
settings:
|
|
rebuild: true
|
|
mount:
|
|
- ./node_modules
|
|
- ./yarn.lock
|
|
|
|
- name: scp
|
|
image: appleboy/drone-scp
|
|
settings:
|
|
host: 124.156.152.247
|
|
username:
|
|
from_secret: ssh_username
|
|
password:
|
|
from_secret: ssh_pwd
|
|
port: 8011
|
|
target: /mnt/d/deploy/node/UserModule
|
|
source: dist
|
|
|
|
# - name: deploy
|
|
# image: appleboy/drone-ssh
|
|
# settings:
|
|
# host: 124.156.152.247
|
|
# username:
|
|
# from_secret: ssh_username
|
|
# password:
|
|
# from_secret: ssh_pwd
|
|
# port: 8011
|
|
# script:
|
|
# - echo hello
|
|
# - echo world
|
|
# - ls -l
|
|
|
|
volumes:
|
|
- name: modules
|
|
host:
|
|
path: /mnt/d/ci_volumes
|