Commit d973a532 authored by lipengcheng 's avatar lipengcheng

docker

parent 51bd0afe
......@@ -71,18 +71,11 @@ job-deploy:
- echo '登录部署服务器拉取镜像并启动'
- pwd
- whoami
# - ssh root@119.45.165.197 "docker pull ${ImageName}"
# - ssh root@119.45.165.197 "if [ $(docker ps -aq --filter name=${ContainerName}) ]; then docker rm -f ${ContainerName};fi"
# - ssh root@119.45.165.197 "docker images"
# - ssh root@119.45.165.197 "docker ps"
# - ssh root@119.45.165.197 "docker run -itd -p 84:80 --name ${ContainerName} ${ImageName}"
# - sh ./notification_boot.sh "on_success" ${CI_COMMIT_REF_SLUG} ${CI_COMMIT_SHA:0:8} "PackageName_productionRelease_${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHA:0:8}"
# - echo '启动成功...'
- ssh root@119.45.165.197 "docker pull ${ImageName} \
if [ $(docker ps -aq --filter name=${ContainerName}) ]; then docker rm -f ${ContainerName};fi \
docker images \
docker ps \
docker run -itd -p 84:80 --name ${ContainerName} ${ImageName}"
- ssh root@119.45.165.197 "docker pull ${ImageName}"
- ssh root@119.45.165.197 "if [ $(docker ps -aq --filter name=${ContainerName}) ]; then docker rm -f ${ContainerName};fi"
- ssh root@119.45.165.197 "docker images"
- ssh root@119.45.165.197 "docker ps"
- ssh root@119.45.165.197 "docker run -itd -p 84:80 --name ${ContainerName} ${ImageName}"
- sh ./notification_boot.sh "on_success" ${CI_COMMIT_REF_SLUG} ${CI_COMMIT_SHA:0:8} "PackageName_productionRelease_${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHA:0:8}"
- echo '启动成功...'
tags:
......
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