From bb1a33824cb2f39837465a041a5f199d46621b1e Mon Sep 17 00:00:00 2001 From: zhangyousheng Date: Wed, 23 Aug 2023 20:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(CI):=20=E4=BF=AE=E6=94=B9=E5=8F=AA=E6=9C=89?= =?UTF-8?q?master=E5=8F=AF=E4=BB=A5=E8=A7=A6=E5=8F=91=E5=B9=B6=E6=B3=A8?= =?UTF-8?q?=E9=87=8Adeploy=E8=8A=82=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 53 +++++++++++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 32 deletions(-) diff --git a/.drone.yml b/.drone.yml index 276b5c0..9bce1f3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,37 +8,26 @@ steps: 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: -# - name: dockersock -# path: /var/run/docker.sock - - name: deploy - pull: if-not-exists - image: appleboy/drone-ssh + - name: publish + image: plugins/docker settings: - host: - - example1.com - - example2.com - username: ubuntu + username: + from_secret: nexus_username password: - from_secret: ssh_password - port: 22 - command_timeout: 2m - script: - - echo "Hello World" + 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: + - name: dockersock + path: /var/run/docker.sock +# - name: deploy +# pull: if-not-exists +# image: appleboy/drone-ssh # settings: # host: 192.168.31.104 # port: 22 @@ -69,6 +58,6 @@ volumes: host: path: /var/run/docker.sock -#trigger: -# branch: -# - master \ No newline at end of file +trigger: + branch: + - master \ No newline at end of file