Image name 04/117604/3
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Thu, 4 Feb 2021 13:57:39 +0000 (14:57 +0100)
committerClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Tue, 9 Feb 2021 09:56:52 +0000 (10:56 +0100)
- cps-service
- cps-nf-proxy
- cps-and-nf-proxy

Issue-ID: CPS-175
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
Change-Id: I579d3646f54adebc131196acbe74e24299b4ead6

cps-application/pom.xml
cps-parent/pom.xml

index 92cff35..e5b46f6 100644 (file)
     <artifactId>cps-application</artifactId>
 
     <properties>
+        <app>org.onap.cps.Application</app>
+        <image.name>cps-service</image.name>
+        <image.version>${project.version}</image.version>
+        <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
         <minimum-coverage>0.0</minimum-coverage>
+        <nexus.repository>nexus3.onap.org:10003/onap/</nexus.repository>
     </properties>
 
     <dependencies>
                 <plugin>
                     <groupId>com.google.cloud.tools</groupId>
                     <artifactId>jib-maven-plugin</artifactId>
+                    <version>${jib-maven-plugin.version}</version>
+                    <configuration>
+                        <container>
+                            <mainClass>${app}</mainClass>
+                            <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
+                        </container>
+                        <from>
+                            <image>${base.image}</image>
+                        </from>
+                        <to>
+                            <image>${nexus.repository}${image.name}:${image.version}</image>
+                        </to>
+                    </configuration>
                     <executions>
                         <execution>
                             <phase>package</phase>
             </activation>
 
             <properties>
-                <app>org.onap.cps.Application</app>
-                <repository.name>${docker.pushRegistry}onap/cps-nf-proxy</repository.name>
+                <image.name>cps-nf-proxy</image.name>
             </properties>
 
             <dependencies>
             </activation>
 
             <properties>
-                <app>org.onap.cps.Application</app>
-                <repository.name>${docker.pushRegistry}onap/cps-and-nf-proxy</repository.name><!-- better naming? -->
+                <image.name>cps-and-nf-proxy</image.name>
             </properties>
 
             <dependencies>
index 00aa89e..91d1f41 100755 (executable)
         <app>org.onap.cps.Application</app>
         <base.image>openjdk:11-jre-slim</base.image>
         <java.version>11</java.version>
-        <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
         <minimum-coverage>0.9</minimum-coverage>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
         <oparent.version>3.1.0</oparent.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
-        <docker.pushRegistry>nexus3.onap.org:10003/</docker.pushRegistry>
-        <repository.name>${docker.pushRegistry}onap/cps-service</repository.name>
         <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
         <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
         <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
@@ -53,7 +50,6 @@
         <spotbugs.version>4.2.0</spotbugs.version>
         <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
-        <image.version>${project.version}</image.version>
 
         <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
         <sonar.coverage.jacoco.xmlReportPaths>
                     <artifactId>swagger-codegen-maven-plugin</artifactId>
                     <version>${swagger-codegen-maven-plugin.version}</version>
                 </plugin>
-                <plugin>
-                    <groupId>com.google.cloud.tools</groupId>
-                    <artifactId>jib-maven-plugin</artifactId>
-                    <version>${jib-maven-plugin.version}</version>
-                    <configuration>
-                        <container>
-                            <mainClass>${app}</mainClass>
-                            <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
-                        </container>
-                        <from>
-                            <image>${base.image}</image>
-                        </from>
-                        <to>
-                            <image>${repository.name}:${image.version}</image>
-                        </to>
-                    </configuration>
-                </plugin>
                 <plugin>
                     <groupId>com.github.spotbugs</groupId>
                     <artifactId>spotbugs-maven-plugin</artifactId>