@@ -1,47 +1,48 @@ | |||
kind: pipeline | |||
type: docker | |||
name: masterpipe | |||
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 | |||
commands: | |||
- mvn compile | |||
- name: test | |||
image: maven:3-jdk-10 | |||
volumes: | |||
- name: cache | |||
path: /root/.m2 | |||
commands: | |||
- mvn test | |||
- name: 远程主机部署 | |||
image: appleboy/drone-ssh:linux-arm64 | |||
settings: | |||
host: | |||
from_secret: ip | |||
username: | |||
from_secret: name | |||
password: | |||
from_secret: pwd | |||
port: 22 | |||
script: | |||
- chmod +x /home/deploy.sh | |||
- nohup bash /home/deploy.sh & | |||
trigger: | |||
branch: | |||
- master | |||
event: | |||
- push | |||
- pull_request | |||
kind: pipeline | |||
type: docker | |||
name: masterpipe | |||
platform: | |||
os: linux | |||
arch: arm64 | |||
clone: | |||
disable: true | |||
steps: | |||
- name: maven | |||
image: maven:3-jdk-8 | |||
volumes: | |||
- name: maven-build | |||
path: /tmp/testDrone | |||
commands: | |||
- git clone http://wangwei:zq123456@10.16.22.23:43001/wangwei10061/jsxdemo.git | |||
- cd jsxdemo | |||
- ls | |||
- cp README.md /tmp/testDrone/demoREADME.md | |||
- cd /tmp/testDrone | |||
- ls | |||
- name: 远程主机部署 | |||
image: appleboy/drone-ssh:linux-arm64 | |||
settings: | |||
host: | |||
from_secret: SECRET_IP | |||
username: root | |||
password: | |||
from_secret: SECRET_PWD | |||
port: 22 | |||
script: | |||
- cd /tmp/testDrone | |||
- ls | |||
volumes: | |||
- name: maven-build | |||
host: | |||
path: /tmp/testDrone | |||
trigger: | |||
branch: | |||
- master | |||
event: | |||
- push | |||
- pull_request |