From 022d26ee91c6f502db1b4d8e16311cd871b7fd4f Mon Sep 17 00:00:00 2001 From: dashan Date: Mon, 20 Nov 2023 01:11:04 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1d65191..e0018ee 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,10 +12,8 @@ steps: path: /mnt/app/build # 将应用打包好的Jar和执行脚本挂载出来 commands: # 定义在Docker容器中执行的shell命令 - mvn clean package -DskipTests=true # 应用打包命 - - cp target/drone-demo.jar /mnt/app/build/drone-demo.jar - - cp entrypoint.sh /mnt/app/build/ - - cp Dockerfile /mnt/app/build/ - - cp run.sh /mnt/app/build/ + - sh copy.sh + - cp docker /mnt/app/build/ - name: build-docker image: plugins/docker @@ -24,12 +22,14 @@ steps: path: /mnt/app/build # 将应用打包好的Jar和执行脚本挂载出来 - name: docker path: /var/run/docker.sock # 挂载宿主机的docker - settings: - dockerfile: /mnt/app/build/Dockerfile + #settings: + # dockerfile: /mnt/app/build/Dockerfile commands: # 定义在Docker容器中执行的shell命令 - - cd /mnt/app/build - - chmod +x run.sh - - sh run.sh + - cd /mnt/app/build/docker + - chmod +x deploy.sh + - sh deploy.sh stop + - sh deploy.sh rm + - sh deploy.sh module - docker ps volumes: # 定义流水线挂载目录,用于共享数据