Commit 84e708c0 authored by 金凯强's avatar 金凯强 🎨

ci修改

parent 2a0fd1ea
......@@ -6,8 +6,8 @@ stages:
- deploy
variables:
APP_NAME: # 这里写上app名称
APP_CODE: # 这里写上appCode
APP_NAME: install_api
APP_CODE: InstallAPI
APP_IMAGE: "${HUANSI_REGISTRY_URL}/huansi/${APP_NAME}"
before_script:
......@@ -36,17 +36,17 @@ push:
only:
- web
deploy-dev:
stage: deploy
retry: 2
tags:
- dev
variables:
APP_CNAME: "${APP_NAME}-${CI_COMMIT_REF_NAME}"
APP_PORT: # app的端口号
script:
- docker ps -a | grep -i ${APP_CNAME} > /dev/null 2>&1 && docker stop ${APP_CNAME} && docker rm ${APP_CNAME}
- docker images|grep none|grep ${APP_IMAGE} > /dev/null 2>&1 && docker images|grep none|grep ${APP_IMAGE}|awk '{print $3}'|xargs docker rmi
- docker run --name ${APP_CNAME} -d --env-file variable.env -p ${APP_PORT}:8080 -v /huansi/temp_data/mes_api:/huansi_app/static_file/temp ${APP_IMAGE}:${CI_COMMIT_REF_NAME}
only:
- dev
\ No newline at end of file
#deploy-dev:
# stage: deploy
# retry: 2
# tags:
# - dev
# variables:
# APP_CNAME: "${APP_NAME}-${CI_COMMIT_REF_NAME}"
# APP_PORT: # app的端口号
# script:
# - docker ps -a | grep -i ${APP_CNAME} > /dev/null 2>&1 && docker stop ${APP_CNAME} && docker rm ${APP_CNAME}
# - docker images|grep none|grep ${APP_IMAGE} > /dev/null 2>&1 && docker images|grep none|grep ${APP_IMAGE}|awk '{print $3}'|xargs docker rmi
# - docker run --name ${APP_CNAME} -d --env-file variable.env -p ${APP_PORT}:8080 -v /huansi/temp_data/mes_api:/huansi_app/static_file/temp ${APP_IMAGE}:${CI_COMMIT_REF_NAME}
# only:
# - dev
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment