Настройка CICD
This commit is contained in:
parent
62f4682d81
commit
e8107a3012
104
.drone.yml
Normal file
104
.drone.yml
Normal file
@ -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: e1c7d048e5af7cc1d54a07af78193e5671d3d1f0632dc487f9be8095923af820
|
||||
|
||||
...
|
19
.gitignore
vendored
19
.gitignore
vendored
@ -20,23 +20,8 @@ dependency-reduced-pom.xml
|
||||
buildNumber.properties
|
||||
.mvn/timing.properties
|
||||
.mvn/wrapper/maven-wrapper.jar
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
.idea/**/contentModel.xml
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
.idea/
|
||||
cmake-build-*/
|
||||
.idea/**/mongoSettings.xml
|
||||
*.iws
|
||||
out/
|
||||
.idea_modules/
|
||||
@ -46,8 +31,6 @@ com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
.idea/httpRequests
|
||||
.idea/caches/build_file_checksums.ser
|
||||
*~
|
||||
.fuse_hidden*
|
||||
.directory
|
||||
|
150
pom.xml
150
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>dev.struchkov.haiti.filter</groupId>
|
||||
<artifactId>haiti-filter-quarkus-reactive</artifactId>
|
||||
<version>0.8.0</version>
|
||||
<version>0.9.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Haiti Filter Reactive Quarkus</name>
|
||||
@ -24,20 +24,27 @@
|
||||
</issueManagement>
|
||||
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<java.version>17</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
|
||||
<quarkus.platform.version>2.14.1.Final</quarkus.platform.version>
|
||||
<haiti.filter.jooq.version>0.8.0</haiti.filter.jooq.version>
|
||||
<quarkus.platform.version>2.16.3.Final</quarkus.platform.version>
|
||||
<haiti.filter.jooq.version>1.0.0</haiti.filter.jooq.version>
|
||||
|
||||
<plugin.maven.compiler.ver>3.9.0</plugin.maven.compiler.ver>
|
||||
<plugin.nexus.staging.ver>1.6.8</plugin.nexus.staging.ver>
|
||||
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
|
||||
<plugin.maven.compiler.ver>3.11.0</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>
|
||||
<plugin.maven.javadoc.ver>3.3.1</plugin.maven.javadoc.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>
|
||||
@ -83,6 +90,19 @@
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<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>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
@ -94,15 +114,6 @@
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</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-source-plugin</artifactId>
|
||||
@ -156,6 +167,10 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
@ -176,6 +191,11 @@
|
||||
<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>
|
||||
@ -192,8 +212,99 @@
|
||||
</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://github.com/haiti-projects/haiti-filter-reactive-quarkus.git</connection>
|
||||
<url>https://github.com/haiti-projects/haiti-filter-reactive-quarkus</url>
|
||||
@ -201,13 +312,6 @@
|
||||
</developerConnection>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
<snapshotRepository>
|
||||
<id>ossrh</id>
|
||||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>uPagge</id>
|
||||
|
Loading…
Reference in New Issue
Block a user