From 91e6fea106c6e2e48b045de2ab9848b2f8830ed8 Mon Sep 17 00:00:00 2001 From: Yosheng Date: Fri, 6 Oct 2023 18:14:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(CI):=20=E6=B5=8B=E8=AF=95=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=B8=8A=E6=AC=A1=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7563b5c..72ed32c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,28 +3,28 @@ type: docker name: deployment steps: -# - name: check -# image: alpine -# commands: -# - ls -la -# - ls -la Dockerfile # 查看当前文件夹是否包含了Dockerfile -# - name: publish -# image: plugins/docker -# settings: -# username: -# from_secret: nexus_username -# password: -# from_secret: nexus_password -# pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载 -# dockerfile: Dockerfile -# tags: latest -# # you need insecure: true since we don't have a TLS certificate -# insecure: true -# registry: 192.168.31.104:8082 -# repo: 192.168.31.104:8082/tiamo/user-point-management -# volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置 -# - name: dockersock -# path: /var/run/docker.sock + - name: check + image: alpine + commands: + - ls -la + - ls -la Dockerfile # 查看当前文件夹是否包含了Dockerfile + - name: publish + image: plugins/docker + settings: + username: + from_secret: nexus_username + password: + from_secret: nexus_password + pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载 + dockerfile: Dockerfile + tags: latest + # you need insecure: true since we don't have a TLS certificate + insecure: true + registry: 192.168.31.104:8082 + repo: 192.168.31.104:8082/tiamo/user-point-management + volumes: # 将容器内目录挂载到宿主机,仓库需要开启Trusted设置 + - name: dockersock + path: /var/run/docker.sock - name: deploy pull: if-not-exists image: appleboy/drone-ssh @@ -51,7 +51,7 @@ steps: - docker container prune -f - echo 开始清除镜像 - docker rmi tiamo/user-point-management:latest - - echo 开始标签镜像 + - echo 开始重新标签镜像 - docker tag 192.168.31.104:8082/tiamo/user-point-management tiamo/user-point-management:latest - echo 开始运行容器 - docker run --name user-point-management -d -p 29029:5000