You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

workspace:
base: /project
path: src/demo
branches: [ master,develop,uat ]
pipeline:
install:
image: node:16-alpine
commands:
- yarn install # 也可以使用 npm install
build:
image: node:16-alpine
commands:
- yarn run build:dev
when:
event: push
branch: develop
docker-dev:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ]
tags: bh5-web
when:
branch: develop
deploy-dev:
image: appleboy/drone-ssh
host: 1.92.109.79
username: root
password:
from_secret: ssh_password
port: 22 # 可选,指定 SSH 端口,默认为 22
script:
- docker rm -f bh5-web
- docker pull registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:bh5-web
- docker run --name=bh5-web -p 30103:83 -d registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:bh5-web
when:
branch: develop