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.

66 lines
1.6 KiB

6 months ago
workspace:
base: /project
path: src/demo
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
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
when:
branch: uat
docker-prod:
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: DockerfileProd
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
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