Fix refrepo image building 46/104846/1
authorBogumil Zebek <bogumil.zebek@nokia.com>
Wed, 1 Apr 2020 10:51:30 +0000 (12:51 +0200)
committerZebek Bogumil <bogumil.zebek@nokia.com>
Wed, 1 Apr 2020 10:52:34 +0000 (12:52 +0200)
Issue-ID: VNFSDK-569
Signed-off-by: Zebek Bogumil <bogumil.zebek@nokia.com>
Change-Id: Ib59b2cfeff0f1a8150dfb32473f0080f962a0a3d

README.md
pom.xml
vnfmarket-be/deployment/docker/docker-refrepo/pom.xml
vnfmarket-be/deployment/zip/pom.xml
vnfmarket-be/vnf-sdk-marketplace/pom.xml

index 8ca29ac..bca93df 100644 (file)
--- a/README.md
+++ b/README.md
@@ -33,6 +33,10 @@ A platform to automate and manage different kind of VNF test cases for given VNF
 - Provide integration with OPNFV dovetail to run test cases across dovetail and ONAP VNFSDK.
 - Uses Open CLI Platform (OCLIP) for developing, testing, deploying and executing test cases
 - Available as docker container.
+- More details at <https://onap.readthedocs.io/en/latest/submodules/vnfsdk/model.git/docs/index.html>`
 
-
-- `More details <https://onap.readthedocs.io/en/latest/submodules/vnfsdk/model.git/docs/index.html>`_
\ No newline at end of file
+Docker image building
+=====================
+```
+    mvn clean package -Pdocker
+```
diff --git a/pom.xml b/pom.xml
index 0a36bc9..f7a82ac 100644 (file)
--- a/pom.xml
+++ b/pom.xml
 
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <properties>
+                <maven.test.skip>true</maven.test.skip>
+            </properties>
+        </profile>
+    </profiles>
        
 </project>
index 9d8ed8b..0378751 100644 (file)
@@ -41,6 +41,7 @@
         <docker.skip>false</docker.skip>
         <docker.noCache>true</docker.noCache>
         <docker.skip.build>false</docker.skip.build>
+        <onap.nexus.dockerregistry.daily>nexus3.onap.org:10003</onap.nexus.dockerregistry.daily>
   </properties>
 
     <build>
                 <configuration>
                     <verbose>true</verbose>
                     <imageName>onap/vnfsdk/refrepo</imageName>
+                    <imageTags>
+                        <imageTag>${project.version}-${maven.build.timestamp}Z</imageTag>
+                        <imageTag>${project.version}</imageTag>
+                        <imageTag>latest</imageTag>
+                    </imageTags>
                     <noCache>${docker.noCache}</noCache>
-                    <serverId>docker-hub</serverId>
+                    <serverId>${onap.nexus.dockerregistry.daily}</serverId>
                     <dockerDirectory>${basedir}/src/main/docker</dockerDirectory>
                     <resources>
                         <resource>
 
                 </executions>
             </plugin>
-
-
         </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                    <defaultGoal>package</defaultGoal>
+                    <plugins>
+                        <plugin>
+                            <groupId>org.codehaus.mojo</groupId>
+                            <artifactId>exec-maven-plugin</artifactId>
+                            <executions>
+                                <execution>
+                                    <phase>package</phase>
+                                    <goals>
+                                        <goal>exec</goal>
+                                    </goals>
+                                    <configuration>
+                                        <executable>mvn</executable>
+                                        <arguments>
+                                            <argument>package</argument>
+                                            <argument>docker:build</argument>
+                                        </arguments>
+                                    </configuration>
+                                </execution>
+                            </executions>
+                        </plugin>
+                    </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>
index 7370369..78a9709 100644 (file)
             </plugin>
         </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <properties>
+                <maven.test.skip>true</maven.test.skip>
+            </properties>
+        </profile>
+    </profiles>
 </project>
index 498da6b..6c3ae9f 100644 (file)
@@ -247,6 +247,12 @@ due to Security Issues:- CVE-2019-10241,CVE-2019-10247,CVE-2019-10246
                 <skip.unit.tests>false</skip.unit.tests>
             </properties>
         </profile>
+        <profile>
+            <id>docker</id>
+            <properties>
+                <maven.test.skip>true</maven.test.skip>
+            </properties>
+        </profile>
     </profiles>
     <build>
         <finalName>ROOT</finalName>