This commit is contained in:
parent
89d99f4bf7
commit
59b4bcdce3
150
.drone.yml
Normal file
150
.drone.yml
Normal file
@ -0,0 +1,150 @@
|
||||
---
|
||||
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: pipeline
|
||||
#type: docker
|
||||
#name: create-develop-docs-site
|
||||
#
|
||||
#trigger:
|
||||
# branch:
|
||||
# - develop
|
||||
# - docs
|
||||
#
|
||||
#clone:
|
||||
# disable: true
|
||||
#
|
||||
#steps:
|
||||
#
|
||||
# - name: build docs
|
||||
# image: git.struchkov.dev/upagge/mkdocs-material-insiders:latest
|
||||
# volumes:
|
||||
# - name: mkdocs_cache
|
||||
# path: ${DRONE_WORKSPACE}/documentation/ru/.cache
|
||||
# environment:
|
||||
# GIT_SSH:
|
||||
# from_secret: GIT_SSH
|
||||
# GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_rsa -p 222"
|
||||
# commands:
|
||||
# - eval $(ssh-agent -s)
|
||||
# - mkdir -p ~/.ssh
|
||||
# - chmod 700 ~/.ssh
|
||||
# - echo "$GIT_SSH" >> ~/.ssh/id_rsa
|
||||
# - chmod 600 ~/.ssh/id_rsa
|
||||
# - ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts
|
||||
# - chmod 644 ~/.ssh/known_hosts
|
||||
# - git config --global user.name "${DRONE_COMMIT_AUTHOR_NAME}"
|
||||
# - git config --global user.email "${DRONE_COMMIT_AUTHOR_EMAIL}"
|
||||
# - git clone ${DRONE_GIT_SSH_URL} .
|
||||
# - git checkout $DRONE_COMMIT
|
||||
# - cd documentation/spring/ru
|
||||
# - mike deploy --prefix godfather-telegram/spring/ru --branch docs-deploy --push --update-aliases develop
|
||||
#
|
||||
#image_pull_secrets:
|
||||
# - DOCKER_AUTH
|
||||
#
|
||||
#volumes:
|
||||
# - name: mkdocs_cache
|
||||
# host:
|
||||
# path: /drone/volume/mkdocs_cache/godfather_telegram/spring/ru
|
||||
---
|
||||
kind: signature
|
||||
hmac: aa3f6e6fd313a4d2c98d21a230fb62ef93392cb69801abfcd9f025287475b1df
|
||||
|
||||
...
|
250
pom.xml
250
pom.xml
@ -15,6 +15,20 @@
|
||||
<module>yookassa-sdk</module>
|
||||
</modules>
|
||||
|
||||
<name>YooKassa Java SDK</name>
|
||||
<description>Allows you to interact with the YooKassa payment service</description>
|
||||
<url>https://git.struchkov.dev/upagge/yookassa-sdk</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>BSD 3-Clause "New" or "Revised" License</name>
|
||||
<url>https://git.struchkov.dev/upagge/yookassa-sdk/blob/master/LICENSE</url>
|
||||
</license>
|
||||
</licenses>
|
||||
<issueManagement>
|
||||
<system>GitHub</system>
|
||||
<url>https://github.com/upagge/yookassa-sdk/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
@ -23,6 +37,19 @@
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<lombok.version>1.18.26</lombok.version>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||
<plugin.maven.compiler.ver>3.10.1</plugin.maven.compiler.ver>
|
||||
<!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
|
||||
<plugin.nexus.staging.ver>1.6.13</plugin.nexus.staging.ver>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
|
||||
<plugin.maven.source.ver>3.2.1</plugin.maven.source.ver>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
|
||||
<plugin.maven.javadoc.ver>3.5.0</plugin.maven.javadoc.ver>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
|
||||
<plugin.maven.gpg.ver>3.0.1</plugin.maven.gpg.ver>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-release-plugin -->
|
||||
<plugin.maven.release.ver>3.0.0-M7</plugin.maven.release.ver>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@ -80,6 +107,229 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<version>${plugin.nexus.staging.ver}</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>${plugin.maven.source.ver}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${plugin.maven.javadoc.ver}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>${plugin.maven.gpg.ver}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${plugin.maven.compiler.ver}</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>${plugin.maven.release.ver}</version>
|
||||
<configuration>
|
||||
<preparationGoals>clean install</preparationGoals>
|
||||
<tagNameFormat>v.@{project.version}</tagNameFormat>
|
||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||
<pushChanges>false</pushChanges>
|
||||
<localCheckout>true</localCheckout>
|
||||
<signTag>true</signTag>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>release-struchkov-nexus</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<serverId>struchkov-nexus</serverId>
|
||||
<nexusUrl>https://nexus.struchkov.dev/nexus/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
<skipStaging>true</skipStaging>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>snapshot</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<serverId>struchkov-nexus</serverId>
|
||||
<nexusUrl>https://nexus.struchkov.dev/nexus/</nexusUrl>
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>struchkov-nexus-release</id>
|
||||
<url>https://nexus.struchkov.dev/repository/maven-releases/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>fail</checksumPolicy>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>struchkov-nexus-snapshot</id>
|
||||
<url>https://nexus.struchkov.dev/repository/maven-snapshots/</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
<updatePolicy>always</updatePolicy>
|
||||
<checksumPolicy>warn</checksumPolicy>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>struchkov-nexus-release</id>
|
||||
<url>https://nexus.struchkov.dev/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>struchkov-nexus-snapshot</id>
|
||||
<url>https://nexus.struchkov.dev/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://git.struchkov.dev/upagge/yookassa-sdk.git</connection>
|
||||
<url>https://git.struchkov.dev/upagge/yookassa-sdk</url>
|
||||
<developerConnection>scm:git:https://git.struchkov.dev/upagge/yookassa-sdk.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>uPagge</id>
|
||||
|
Loading…
Reference in New Issue
Block a user