diff --git a/.drone.yml b/.drone.yml index c5768a9..5d2dff0 100644 --- a/.drone.yml +++ b/.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 + tags: bseller-web 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 - - + 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 - when: - branch: uat \ No newline at end of file + 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: develop \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1289c79..2ad9ec3 100644 --- a/.gitignore +++ b/.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/ \ No newline at end of file +/.env.local +/src/**/dist/ diff --git a/nginxDev.conf b/nginxDev.conf index 0ccd9c0..18c380d 100644 --- a/nginxDev.conf +++ b/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/ {