Browse Source

test

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

74
.drone.yml

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

27
.gitignore

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

2
nginxDev.conf

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

Loading…
Cancel
Save