From a18e883b45993fca3cbd9898aa9cb5669b8bc64b Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 18 Feb 2023 10:55:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D1=83=20drone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7bbfc95 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,104 @@ +--- +kind: pipeline +type: docker +name: snapshot-publish + +trigger: + branch: + - develop + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + commands: + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - mvn --settings maven-settings.xml -U -P snapshot clean deploy + +--- +kind: pipeline +type: docker +name: release-maven-central + +trigger: + ref: + - refs/tags/v.*.*.* + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish maven central + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + GPG_PRIVATE_KEY: + from_secret: GPG_PRIVATE_KEY + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + GPG_PASSPHRASE: + from_secret: GPG_PASSPHRASE + commands: + - echo "$GPG_PRIVATE_KEY" >> gpg.key + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key + - mvn --settings maven-settings.xml -U -P ossrh,release clean deploy + +--- +kind: pipeline +type: docker +name: release-struchkov-nexus + +trigger: + ref: + - refs/tags/v.*.*.* + +volumes: + - name: m2 + host: + path: /drone/volume/m2 + +steps: + + - name: publish struchkov nexus + image: maven:3.8.5-openjdk-17 + privileged: true + volumes: + - name: m2 + path: /root/.m2/repository + environment: + GPG_PRIVATE_KEY: + from_secret: GPG_PRIVATE_KEY + MAVEN_SETTINGS: + from_secret: MAVEN_SETTINGS + GPG_PASSPHRASE: + from_secret: GPG_PASSPHRASE + commands: + - echo "$GPG_PRIVATE_KEY" >> gpg.key + - echo "$MAVEN_SETTINGS" >> maven-settings.xml + - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import gpg.key + - mvn --settings maven-settings.xml -U -P ossrh,release-struchkov-nexus clean deploy + +--- +kind: signature +hmac: 7bb44df748a5b985b1a14ca11b97cc289ac910aa630e39f9d2113c8455792155 + +...