-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): Update the pom to release on oss
Update the ci to run the right command Fix the licence ref #10
- Loading branch information
Showing
3 changed files
with
176 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ maven:test: | |
artifacts: | ||
reports: | ||
junit: [ | ||
testy-beat-box/target/surefire-reports/TEST-*.xml, | ||
testy-core-box/target/surefire-reports/TEST-*.xml, | ||
testy-jooq-box/target/surefire-reports/TEST-*.xml, | ||
testy-mongo-box/target/surefire-reports/TEST-*.xml | ||
|
@@ -96,6 +97,7 @@ maven:release: | |
dependencies: | ||
- maven:build | ||
script: | ||
- echo ${GPG_PASSPHRASE} | gpg --batch --import "${GPG_SECRET_KEY}" | ||
- git checkout -B "$CI_BUILD_REF_NAME" | ||
- mvn ${MAVEN_CLI_OPTS} -DdryRun=true release:prepare | ||
- git clean -f | ||
|
@@ -107,13 +109,13 @@ maven:release: | |
-DscmCommentPrefix="[maven-release][skip CI] " \ | ||
-DdevelopmentVersion="$(.gitlab/bumpVersion.sh)" \ | ||
release:perform \ | ||
-Darguments="-DskipTests=true -Dmaven.javadoc.skip=true" | ||
-Darguments="-DskipTests=true" | ||
- git clone "[email protected]:${CI_PROJECT_PATH}.git" | ||
- cd "${CI_PROJECT_NAME}" | ||
- git checkout master | ||
- | | ||
git merge --no-ff \ | ||
-m "[maven-release][skip CI] Merge release in master" origin/develop~1 | ||
-m "[maven-release][skip CI] Merge release in master" origin/develop | ||
- git push origin master | ||
rules: | ||
- if: > | ||
|
@@ -135,15 +137,19 @@ maven:sonar: | |
- if: '$CI_COMMIT_REF_NAME == "develop"' | ||
when: always | ||
|
||
maven:deploy: | ||
maven:deploy-snapshot: | ||
stage: deploy | ||
dependencies: | ||
- maven:build | ||
script: mvn ${MAVEN_CLI_OPTS} deploy -DskipTests | ||
script: | | ||
mvn ${MAVEN_CLI_OPTS} deploy \ | ||
-DskipTests \ | ||
-DaltDeploymentRepository="nexus::default::https://nexus.i-run.fr/repository/snapshots/" \ | ||
-DaltSnapshotDeploymentRepository="nexus" \ | ||
-DaltReleaseDeploymentRepository="ossrh" | ||
rules: | ||
- if: > | ||
$CI_COMMIT_REF_NAME == "develop" | ||
|| $CI_COMMIT_REF_NAME == "master" | ||
when: always | ||
⚙trigger:unchained: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>fr.irun</groupId> | ||
|
@@ -10,12 +11,23 @@ | |
<artifactId>testy-box</artifactId> | ||
<version>1.2.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<name>Testy Box</name> | ||
<description>A JUnit 5 tools library.</description> | ||
<url>https://github.com/i-Run/testy-box</url> | ||
<licenses> | ||
<license> | ||
<name>MIT License</name> | ||
<url>https://opensource.org/licenses/MIT</url> | ||
</license> | ||
</licenses> | ||
|
||
<scm> | ||
<connection>scm:git:[email protected]:nora/rocket/testy-box.git</connection> | ||
<developerConnection>scm:git:[email protected]:nora/rocket/testy-box.git</developerConnection> | ||
<url>https://gitlab.i-run.fr/nora/rocket/testy-box</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<modules> | ||
<module>testy-mongo-box</module> | ||
|
@@ -28,6 +40,13 @@ | |
<flapdoodle.version>2.1.1</flapdoodle.version> | ||
<javax.inject.version>1</javax.inject.version> | ||
<qpid.version>7.1.7</qpid.version> | ||
|
||
<maven-release-plugin.version>2.5.3</maven-release-plugin.version> | ||
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version> | ||
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version> | ||
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version> | ||
<maven-scm-provider-gitexe.version>1.11.2</maven-scm-provider-gitexe.version> | ||
<maven-scm-api.version>1.11.2</maven-scm-api.version> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
|
@@ -68,4 +87,146 @@ | |
|
||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>nexus</id> | ||
<url>https://nexus.i-run.fr/repository/snapshots/</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>ossrh</id> | ||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
|
||
<profiles> | ||
<profile> | ||
<id>releases</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>${maven-release-plugin.version}</version> | ||
<configuration> | ||
<localCheckout>true</localCheckout> | ||
<pushChanges>false</pushChanges> | ||
<mavenExecutorId>forked-path</mavenExecutorId> | ||
<releaseProfiles>releases</releaseProfiles> | ||
</configuration> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.maven.scm</groupId> | ||
<artifactId>maven-scm-provider-gitexe</artifactId> | ||
<version>${maven-scm-provider-gitexe.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven.scm</groupId> | ||
<artifactId>maven-scm-api</artifactId> | ||
<version>${maven-scm-api.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>${maven-source-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>${maven-javadoc-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-gpg-plugin</artifactId> | ||
<version>${maven-gpg-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<useAgent>true</useAgent> | ||
<passphrase>${env.GPG_PASSPHRASE}</passphrase> | ||
<gpgArguments> | ||
<arg>--pinentry-mode</arg> | ||
<arg>loopback</arg> | ||
</gpgArguments> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-deploy-plugin</artifactId> | ||
<version>${maven-deploy-plugin.version}</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>${nexus-staging-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>default-deploy</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>deploy</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://oss.sonatype.org/</nexusUrl> | ||
<autoReleaseAfterClose>true</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
<developers> | ||
<developer> | ||
<id>bnwander</id> | ||
<name>Bertrand Neuenschwander</name> | ||
<organization>i-Run</organization> | ||
<organizationUrl>https://www.i-run.fr</organizationUrl> | ||
</developer> | ||
<developer> | ||
<id>cdeverre</id> | ||
<name>Christophe Deverre</name> | ||
<organization>i-Run</organization> | ||
<organizationUrl>https://www.i-run.fr</organizationUrl> | ||
</developer> | ||
<developer> | ||
<id>fcombes</id> | ||
<name>Frédéric Combes</name> | ||
<organization>i-Run</organization> | ||
<organizationUrl>https://www.i-run.fr</organizationUrl> | ||
</developer> | ||
</developers> | ||
</project> |