diff --git a/.drone.yml b/.drone.yml index 5578537..853dfb0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,60 +1,19 @@ kind: pipeline -type: docker -name: master +type: exec +name: deployment + +platform: + os: linux + arch: amd64 + steps: - - name: restore-cache - image: meltwater/drone-cache - settings: - backend: filesystem - restore: true - cache_key: "maven" - archive_format: gzip - filesystem_cache_root: "/var/lib/cache" - mount: - - "maven" - volumes: - - name: cache - path: "/var/lib/cache" - # Do stuff.. - - name: build - image: maven:3.8-openjdk-8 - commands: - - mkdir /root/.m2 - - cp /usr/share/maven/ref/settings-docker.xml /root/.m2/settings.xml - - sed -i 's/\\/usr\\/share\\/maven\\/ref\\/repository/\\/drone\\/src\\/maven/g' /root/.m2/settings.xml - - mvn package - - name: rebuild-cache - image: meltwater/drone-cache - settings: - backend: filesystem - rebuild: true - cache_key: "maven" - archive_format: gzip - filesystem_cache_root: "/var/lib/cache" - mount: - - "maven" - volumes: - - name: cache - path: "/var/lib/cache" - - name: docker - image: plugins/docker - settings: - dockerfile: "Dockerfile.drone" - repo: harbor.oa00.com/sws/project0512 - registry: harbor.oa00.com - username: - from_secret: docker_username - password: - from_secret: docker_password - tags: - - master -volumes: - - name: cache - host: - path: "/var/lib/cache" -trigger: - branch: - - master - event: - - push - - merge + - name: backend image build + commands: + - echo start build images... + - export MAJOR_VERSION=1.0.rtm. + - export BUILD_NUMBER=$DRONE_BUILD_NUMBER + - export WORKSPACE=`pwd` + - bash ./build.sh + when: + branch: + - master