From b7316806634a2f90ba5754fe050d1cee8d989ba8 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sun, 18 Dec 2022 01:45:39 +0300 Subject: [PATCH] =?UTF-8?q?=20=D0=9D=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B0=20CICD=20=D1=81=20=D0=BF=D0=BE=D0=BC=D0=BE=D1=89?= =?UTF-8?q?=D1=8C=D1=8E=20Drone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 65 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/.drone.yml b/.drone.yml index c23b08b..884171f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,6 +3,25 @@ kind: pipeline type: docker name: develop build +trigger: + branch: + - develop + +services: + - name: docker + image: docker:20.10.22-dind-alpine3.17 + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + - name: dockersock + temp: {} + steps: - name: create jar image: maven:3.8.6-eclipse-temurin-17 @@ -29,16 +48,31 @@ steps: - docker buildx create --use - docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:develop" . -trigger: - branch: - - develop - --- kind: pipeline type: docker name: release build +trigger: + ref: + - refs/tags/v.*.*.* + +services: + - name: docker + image: docker:20.10.22-dind-alpine3.17 + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + - name: dockersock + temp: {} + steps: - name: create jar image: maven:3.8.6-eclipse-temurin-17 @@ -63,25 +97,4 @@ steps: commands: - echo "$DOCKER_REGISTRY_TOKEN" | docker login docker.io --username $DOCKER_REGISTRY_USER --password-stdin - docker buildx create --use - - docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:latest" -t "$DOCKER_IMAGE_NAME:$DRONE_TAG" . - -trigger: - ref: - - refs/tags/v.*.*.* - ---- - -services: - - name: docker - image: docker:20.10.22-dind-alpine3.17 - privileged: true - volumes: - - name: dockersock - path: /var/run - -volumes: - - name: m2 - host: - path: /drone/volume/m2 - - name: dockersock - temp: {} \ No newline at end of file + - docker buildx build --push --platform linux/amd64,linux/arm64/v8 -t "$DOCKER_IMAGE_NAME:latest" -t "$DOCKER_IMAGE_NAME:$DRONE_TAG" . \ No newline at end of file