Browse Source

test

develop
文武 6 months ago
parent
commit
75151954ce
  1. 70
      .drone.yml
  2. 27
      .gitignore
  3. 2
      nginxDev.conf

70
.drone.yml

@ -6,61 +6,41 @@ branches: [ master,develop,uat ]
pipeline:
# build:
# image: node
# commands:
# - yarn config set registry https://registry.npm.taobao.org/
# - yarn install
# - yarn build:dev
docker-dev:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller-web
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ]
tags: latest
when:
branch: develop
install:
image: node:16-alpine
commands:
- yarn install # 也可以使用 npm install
docker-uat:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller-web
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileUat
secrets: [ docker_username, docker_password ]
tags: latest
build:
image: node:16-alpine
commands:
- yarn run build:test
when:
branch: uat
event: push
branch: develop
docker-prod:
docker-dev:
image: plugins/docker
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller-web
repo: registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller
registry: registry.cn-shenzhen.aliyuncs.com
use_cache: true
dockerfile: DockerfileProd
dockerfile: DockerfileDev
secrets: [ docker_username, docker_password ]
tags: v1.0.0
when:
branch: master
deploy-dev:
image: roffe/kubectl
commands:
- rm -rf /root/.kube && cp -r .kube /root
- kubectl delete -f deployUat.yaml || true
- kubectl apply -f deployUat.yaml
tags: bseller-web
when:
branch: develop
deploy-dev:
image: roffe/kubectl
commands:
- rm -rf /root/.kube && cp -r .kube /root
- kubectl delete -f deployDev.yaml || true
- kubectl apply -f deployDev.yaml
image: appleboy/drone-ssh
host: 1.92.109.79
username: root
password:
from_secret: ssh_password
port: 22 # 可选,指定 SSH 端口,默认为 22
script:
- docker rm -f bseller-web
- docker pull registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:bseller-web
- docker run --name=bseller-web -p 30102:83 -d registry.cn-shenzhen.aliyuncs.com/ax-stor/ax-bkb-seller:bseller-web
when:
branch: uat
branch: develop

27
.gitignore

@ -1,14 +1,21 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.env.local
/.umirc.local.ts
/config/config.local.ts
/npm-debug.log*
/yarn-error.log
# production
/dist
*.zip
*.bak
# misc
.DS_Store
# umi
/src/.umi
/src/.umi-production
/src/.umi-test
/.umi
/.umi-production
/.umi-test
/.mfsu
*.history
.mocks/
/.env.local
/src/**/dist/

2
nginxDev.conf

@ -13,7 +13,7 @@ server {
location /api/ {
client_max_body_size 500m;
proxy_pass http://ax-api.sumweal.com/bkb-seller/;
proxy_pass http://1.92.109.79:30203/;
}
location /minio/ {

Loading…
Cancel
Save