--- kind: pipeline name: default type: docker platform: os: linux arch: amd64 clone: image: reg.int.it2000.com.cn/devops/git tags: true skip_verify: true steps: - name: restore-cache image: drillster/drone-volume-cache settings: restore: true mount: - .m2 - name: maven build image: maven:3-alpine commands: - mvn clean package -Dmaven.test.skip=true volumes: - name: cache path: /root/.m2 - name: rebuild-cache image: drillster/drone-volume-cache settings: rebuild: true mount: - .m2 # when: # status: # - success # - failure - name: publish image: plugins/docker volumes: - name: certs path: /etc/ssl/certs/ca-certificates.crt - name: docker path: /var/run/docker.sock settings: repo: reg.int.it2000.com.cn/cdia/msgexchange-api registry: reg.int.it2000.com.cn insecure: true tags: [ "${DRONE_COMMIT_SHA:0:4}","latest" ] # auth: ZmVuZ3poaXFpYW5nOmFkbWluZ3p6bg== username: from_secret: registry_user password: from_secret: registry_pass when: branch: - develop - name: release-publish image: plugins/docker volumes: - name: certs path: /etc/ssl/certs/ca-certificates.crt - name: docker path: /var/run/docker.sock settings: repo: reg.int.it2000.com.cn/cdia/msgexchange-api registry: reg.int.it2000.com.cn tags: [ "${DRONE_COMMIT_SHA:0:7}","latest" ] insecure: true auto_tag: true username: from_secret: registry_user password: from_secret: registry_pass when: event: tag volumes: - name: cache host: path: /root/.m2