mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-06 01:37:15 +02:00
set urls for snapshot and release repositories
This commit is contained in:
@@ -294,6 +294,43 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmavenplus</groupId>
|
||||
<artifactId>gmavenplus-plugin</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<type>pom</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>set-repo-suffix</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<scripts>
|
||||
<script>
|
||||
<![CDATA[
|
||||
String suffix = "releases"
|
||||
if (project.version.contains("SNAPSHOT")) {
|
||||
suffix = "snapshots"
|
||||
}
|
||||
project.properties.setProperty("apt.repository.suffix", suffix)
|
||||
]]>
|
||||
</script>
|
||||
</scripts>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>net.lopht.maven-plugins</groupId>
|
||||
<artifactId>upload-maven-plugin</artifactId>
|
||||
@@ -307,12 +344,9 @@
|
||||
<configuration>
|
||||
<file>${project.artifact.file}</file>
|
||||
<preemptiveAuth>true</preemptiveAuth>
|
||||
<!--
|
||||
TODO adjust url and path
|
||||
-->
|
||||
<repositoryUrl>http://localhost:8081</repositoryUrl>
|
||||
<repositoryPath>/repository/debian-releases/</repositoryPath>
|
||||
<serverId>local-nexus</serverId>
|
||||
<repositoryUrl>${deployment.target}</repositoryUrl>
|
||||
<repositoryPath>/repository/apt-v2-${apt.repository.suffix}/</repositoryPath>
|
||||
<serverId>${deployment.serverId}</serverId>
|
||||
<usePOST>true</usePOST>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
@@ -149,16 +149,58 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmavenplus</groupId>
|
||||
<artifactId>gmavenplus-plugin</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<type>pom</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>set-repository-and-version</id>
|
||||
<phase>initialize</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<scripts>
|
||||
<script>
|
||||
<![CDATA[
|
||||
def repository = "docker.io/scmmanager/scm-manager"
|
||||
def version = project.version
|
||||
|
||||
if (version.contains("SNAPSHOT")) {
|
||||
repository = "docker.io/cloudogu/scm-manager"
|
||||
def format = new java.text.SimpleDateFormat("yyyyMMdd-HHmmss")
|
||||
version = version.replace("SNAPSHOT", format.format(new Date()))
|
||||
}
|
||||
|
||||
project.properties.setProperty("docker.repository", repository)
|
||||
project.properties.setProperty("docker.tag", version)
|
||||
]]>
|
||||
</script>
|
||||
</scripts>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>dockerfile-maven-plugin</artifactId>
|
||||
<version>1.4.13</version>
|
||||
<configuration>
|
||||
<!-- TODO adjust image name -->
|
||||
<!--repository>docker.io/scmmanager/scm-manager</repository-->
|
||||
<repository>artifacts.scm-manager.org:50000/scmmanager/scm-manager</repository>
|
||||
<repository>${docker.repository}</repository>
|
||||
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
|
||||
<tag>${project.version}</tag>
|
||||
<tag>${docker.tag}</tag>
|
||||
<contextDirectory>target/build</contextDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
||||
@@ -134,15 +134,14 @@
|
||||
<autoDetectLocalHelmBinary>false</autoDetectLocalHelmBinary>
|
||||
<appVersion>${project.version}</appVersion>
|
||||
<helmDownloadUrl>https://get.helm.sh/helm-v${helm.version}-${helm.os}-${helm.arch}.tar.gz</helmDownloadUrl>
|
||||
<!-- TODO urls and snapshot handling -->
|
||||
<uploadRepoStable>
|
||||
<name>local-nexus</name>
|
||||
<url>http://localhost:8081/repository/helm-releases/</url>
|
||||
<name>${deployment.serverId}</name>
|
||||
<url>${deployment.target}/repository/helm-v2-releases/</url>
|
||||
<type>ARTIFACTORY</type>
|
||||
</uploadRepoStable>
|
||||
<uploadRepoSnapshot>
|
||||
<name>local-nexus</name>
|
||||
<url>http://localhost:8081/repository/helm-releases/</url>
|
||||
<name>${deployment.serverId}</name>
|
||||
<url>${deployment.target}/repository/helm-v2-snapshots/</url>
|
||||
<type>ARTIFACTORY</type>
|
||||
</uploadRepoSnapshot>
|
||||
</configuration>
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
<packaging>pom</packaging>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<deployment.serverId>packages-test.scm-manager.org</deployment.serverId>
|
||||
<deployment.target>https://packages-test.scm-manager.org</deployment.target>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>packaging</id>
|
||||
|
||||
@@ -326,6 +326,43 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmavenplus</groupId>
|
||||
<artifactId>gmavenplus-plugin</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<type>pom</type>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>set-repo-suffix</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>execute</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<scripts>
|
||||
<script>
|
||||
<![CDATA[
|
||||
String suffix = "releases"
|
||||
if (project.version.contains("SNAPSHOT")) {
|
||||
suffix = "snapshots"
|
||||
}
|
||||
project.properties.setProperty("yum.repository.suffix", suffix)
|
||||
]]>
|
||||
</script>
|
||||
</scripts>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>net.lopht.maven-plugins</groupId>
|
||||
<artifactId>upload-maven-plugin</artifactId>
|
||||
@@ -339,12 +376,10 @@
|
||||
<configuration>
|
||||
<file>${project.artifact.file}</file>
|
||||
<preemptiveAuth>true</preemptiveAuth>
|
||||
<!--
|
||||
TODO adjust url and path
|
||||
-->
|
||||
<repositoryUrl>http://localhost:8081</repositoryUrl>
|
||||
<repositoryPath>/repository/redhat-releases/${project.artifact.file.name}</repositoryPath>
|
||||
<serverId>local-nexus</serverId>
|
||||
<repositoryUrl>${deployment.target}</repositoryUrl>
|
||||
<repositoryPath>/repository/yum-v2-${yum.repository.suffix}/${project.artifact.file.name}</repositoryPath>
|
||||
<serverId>${deployment.serverId}</serverId>
|
||||
<usePOST>true</usePOST>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
Reference in New Issue
Block a user