From 292ab6b6a9de55716ef367a38e9bd3d207a18eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E7=BA=A7=E4=BA=91=E8=84=91=E7=A0=94=E5=8F=91?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=B8=88?= <153692773@qq.com> Date: Fri, 24 Feb 2023 09:54:37 +0800 Subject: [PATCH] update pipeline for ansible branch --- .drone.yml | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0a21b56..b35f536 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,44 +1,27 @@ kind: pipeline type: docker -name: masterpipe +name: 1 platform: os: linux arch: arm64 -volumes: -- name: cache - host: - path: /var/lib/cache steps: - name: maven image: maven:3-jdk-10 volumes: - - name: cache - path: /root/.m2 + - name: cache + path: /root/.m2 commands: - mvn compile -- name: test - image: maven:3-jdk-10 - volumes: - - name: cache - path: /root/.m2 - commands: - - mvn test -- name: 远程主机部署 - image: appleboy/drone-ssh + +- name: check ansible syntax + image: plugins/ansible:3 settings: - host: - from_secret: ip - username: - from_secret: name - password: - from_secret: pwd - port: 22 - script: - - chmod +x /home/deploy.sh - - ./home/deploy.sh + playbook: ansible/playbook.yml + galaxy: ansible/requirements.yml + inventory: ansible/inventory + syntax_check: true trigger: branch: - - master + - ansible event: - - push - - pull_request + - cron