test: auto
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
mol
2023-08-09 10:16:43 +08:00
parent d693116662
commit d9182ecc3f

View File

@ -40,10 +40,10 @@ steps: # 定义管道的执行步骤
secrets: [docker_username, docker_passwd] secrets: [docker_username, docker_passwd]
script: script:
- echo ==-----==开始部署==-----== - echo ==-----==开始部署==-----==
- docker login -u $docker_username -p $docker_passwd git.hiiragi.club:8081 - docker login -u ${docker_username} -p ${docker_passwd} git.hiiragi.club:8081
- docker pull git.hiiragi.club:8081/mol/mirai-robot - docker pull git.hiiragi.club:8081/mol/mirai-robot:latest
- list=$(docker ps -a| grep mirai_robot* | awk '{print $1}') - list=$(docker ps -a| grep mirai_robot* | awk '{print $1}')
- test "$list" = "" && echo "none mirai_robot containers running" || docker stop $list - test "$list" = "" && echo "none mirai_robot containers running" || docker stop $list
# 过滤出dockerImages的id, 删除none镜像 # 过滤出dockerImages的id, 删除none镜像
- docker run -d -p 16808:8080 --name=mirai_robot_${DRONE_BUILD_NUMBER} -e QQ:3377438428 -e WEB_HOOK_PORT:8080 -e IMG_NUMBER_IN_ONE_MESSAGE:3 -e MIRAI_HTTP_API_HOST:http://192.168.124.12:15122 -e MIRAI_HTTP_API_VERIFY_KEY:heiyu518 git.hiiragi.club:8081/mol/mirai-robot - docker run -d -p 16808:8080 --name=mirai_robot_${DRONE_BUILD_NUMBER} -e QQ=3377438428 -e WEB_HOOK_PORT=8080 -e IMG_NUMBER_IN_ONE_MESSAGE=3 -e MIRAI_HTTP_API_HOST=http://192.168.124.12:15122 -e MIRAI_HTTP_API_VERIFY_KEY=heiyu518 git.hiiragi.club:8081/mol/mirai-robot:latest
- echo ==-----==部署成功==-----== - echo ==-----==部署成功==-----==