From 91a40cdd144ac7b21c27c31a2dc36f6f44488f74 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Mon, 23 Jan 2023 15:17:25 +0300 Subject: [PATCH] add drone --- .drone.yml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 17 -------- pom.xml | 10 ++--- 3 files changed, 108 insertions(+), 22 deletions(-) create mode 100644 .drone.yml delete mode 100644 .gitlab-ci.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..1fd8b27 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,103 @@ +--- +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: ef2fc291eccd3ad61a646b5fc652e09d6fd7ae10714b35aa6bf147a52529e8e0 + +... diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 65f01de..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,17 +0,0 @@ -image: maven:3.8.4-openjdk-11 -variables: - MAVEN_OPTS: "-Dmaven.repo.local=./.m2/repository" - -stages: - - deploy - -deploy: - stage: deploy - only: - - /^v.*$/ - except: - - branches - before_script: - - gpg --pinentry-mode loopback --passphrase $GPG_PASSPHRASE --import $GPG_PRIVATE_KEY - script: - - 'mvn --settings $MAVEN_SETTINGS -U -P ossrh,release clean deploy' \ No newline at end of file diff --git a/pom.xml b/pom.xml index 0cfddb2..4eb1875 100644 --- a/pom.xml +++ b/pom.xml @@ -6,12 +6,12 @@ dev.struchkov.haiti haiti-dependencies - 2.0.0 + 2.4.0 dev.struchkov.haiti.utils haiti-utils-field-constants - 0.0.6 + 0.0.7-SNAPSHOT Haiti Field Name Constants Utils Generating class field names @@ -71,9 +71,9 @@ - scm:git:https://github.com/haiti-projects/haiti-utils-field-constants.git - https://github.com/haiti-projects/haiti-utils-field-constants - scm:git:https://github.com/haiti-projects/haiti-utils-field-constants.git + scm:git:https://git.struchkov.dev/Haiti/haiti-utils-field-constants.git + https://git.struchkov.dev/Haiti/haiti-utils-field-constants + scm:git:https://git.struchkov.dev/Haiti/haiti-utils-field-constants.git \ No newline at end of file