kind: pipeline name: default steps: - name: restore-cache image: rpi.it5000.com:5000/drillster/drone-volume-cache settings: restore: true mount: - ./repository volumes: - name: cache path: /cache - name: mvn-package image: rpi.it5000.com:5000/jaikuai/npm-mvn:rpi commands: - mvn clean package -Dmaven.test.skip=true -Dmaven.repo.local=./repository -s ./setting.xml - name: rebuild-cache image: rpi.it5000.com:5000/drillster/drone-volume-cache settings: rebuild: true mount: - ./repository volumes: - name: cache path: /cache - name: docker-build image: rpi.it5000.com:5000/docker:27 privileged: true volumes: - name: docker path: /var/run/docker.sock commands: - docker build -t registry.dev.fast-fun.cn:82/zk/zhili-station-server:2.0.${DRONE_BUILD_NUMBER} -f Dockerfile . - docker push registry.dev.fast-fun.cn:82/zk/zhili-station-server:2.0.${DRONE_BUILD_NUMBER} when: branch: - prd - dev - name: deploy image: rpi.it5000.com:5000/appleboy/drone-ssh settings: host: 192.168.0.175 username: root password: qx123456 script: - docker rm -f station-server - docker run -d -p 8888:8888 -p 9987:9987 -e PRO_ENV=test --name station-server --restart=always registry.dev.fast-fun.cn:82/zk/zhili-station-server:2.0.${DRONE_BUILD_NUMBER} volumes: - name: cache host: path: /home/drone/cache - name: docker host: path: /var/run/docker.sock