Create new jenkins-staging profile to deploy on the staging repository.

This commit is contained in:
Manuele Simi 2019-08-13 22:07:50 -04:00
parent 35d2d62429
commit 5389807e29
1 changed files with 107 additions and 0 deletions

107
pom.xml
View File

@ -342,6 +342,110 @@
</build>
</profile>
<profile>
<id>jenkins-staging</id>
<properties>
<gcube.release.number>${env.GCUBE_RELEASE_NUMBER}</gcube.release.number>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>jenkins-staging</name>
<value>true</value>
</property>
</activation>
<!-- Repositories for dependency resolution -->
<repositories>
<repository>
<id>gcube-releases</id>
<name>gCube Releases</name>
<url>${repository.staging.readonly}</url>
</repository>
<repository>
<id>gcube-externals</id>
<name>gCube Externals</name>
<url>${repository.externals.readonly}</url>
</repository>
</repositories>
<!-- Repositories for deployments -->
<distributionManagement>
<repository>
<id>gcube-staging-jenkins</id>
<name>gCube Staging</name>
<url>${repository.staging.readwrite}</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>useLastCommittedRevision</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<shortRevisionLength>10</shortRevisionLength>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<archive>
<manifestEntries>
<SCM-Revision>${buildNumber}</SCM-Revision>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<!-- sets the skip.when.is.snapshot.used property to true if SNAPSHOT was used,
to the project version otherwise -->
<id>build-helper-regex-is-snapshot-used</id>
<phase>validate</phase>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>skip.when.is.snapshot.used</name>
<value>${project.version}</value>
<regex>.*-SNAPSHOT$</regex>
<replacement>true</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>${skip.when.is.snapshot.used}</skip>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}-${project.version}-${gcube.release.number}-${buildNumber}</finalName>
</build>
</profile>
<profile>
<id>dry-run</id>
<activation>
@ -652,6 +756,9 @@
<repository.snapshots.readwrite>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/gcube-snapshots</repository.snapshots.readwrite>
<repository.releases.readonly>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-releases</repository.releases.readonly>
<repository.releases.readwrite>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/gcube-releases</repository.releases.readwrite>
<repository.staging.readonly>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-staging-jenkins</repository.staging.readonly>
<repository.staging.readwrite>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-staging-jenkins</repository.staging.readwrite>
<repository.externals.readonly>http://maven.research-infrastructures.eu/nexus/content/repositories/gcube-externals</repository.externals.readonly>
<local.deploy.dir>${env.GLOBUS_LOCATION}/lib</local.deploy.dir>