提交 2210e4ec 作者: 王南南

增加新文件

上级 49b2f544
stages:
- build
- deploy
cache:
paths:
- node_modules/
variables:
PORT: "4000"
LAN_REPO: registry-vpc.cn-beijing.aliyuncs.com
WAN_REPO: registry.cn-beijing.aliyuncs.com
DEV_REPO: qianjia_dev
PRED_REPO: qianjia_pred
PROD_REPO: qianjia_prod
# dev分支
build_push_image_dev_job:
image: registry.cn-beijing.aliyuncs.com/qianjia_public/mygitbook
stage: build
before_script:
- docker login --username=$USERNAME --password=$PASSWORD registry-vpc.cn-beijing.aliyuncs.com
- CONTAINER_NAME=`echo $CI_PROJECT_NAME | tr 'A-Z' 'a-z'| tr '_' '-'`
- TAG=`expr substr $CI_COMMIT_SHA 1 8`
script:
- docker build -t $LAN_REPO/$DEV_REPO/$CONTAINER_NAME:$TAG -f Dockerfile .
- docker push $LAN_REPO/$DEV_REPO/$CONTAINER_NAME:$TAG
tags:
- k8s
only:
- dev
when: on_success
deploy_to_dev_job:
image: registry-vpc.cn-beijing.aliyuncs.com/qianjia2018/qianjia_public:mvn-docker-kube
stage: deploy
before_script:
- CONTAINER_NAME=`echo $CI_PROJECT_NAME | tr 'A-Z' 'a-z'| tr '_' '-'`
- TAG=`expr substr $CI_COMMIT_SHA 1 8`
script:
- bash ~/.local/bin/f200.sh $CONTAINER_NAME $PORT 80 $WAN_REPO/$DEV_REPO/$CONTAINER_NAME:$TAG guojia 192.168.10.200
tags:
- ssh-deploy
only:
- dev
when: on_success
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论