Fix docker and stage site jenkins jobs 33/15133/1
authorVarun Gudisena <vg411h@att.com>
Mon, 25 Sep 2017 16:07:20 +0000 (11:07 -0500)
committerVarun Gudisena <vg411h@att.com>
Mon, 25 Sep 2017 16:07:37 +0000 (11:07 -0500)
Configured docker spotify plug in and
added nexus proxy property

issue-id: DMAAP-144
Change-Id: I6c02b5c90876099fb6b9bf89ebdc862481756f1c
Signed-off-by: Varun Gudisena <vg411h@att.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index f2df084..cbaf8ec 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                <artifactId>docker-maven-plugin</artifactId>
                                <version>0.4.13</version>
                                <configuration>
-                                       <imageName>onap/dmaap-mr</imageName>
+                                       <imageName>onap/dmaap/dmaap-mr</imageName>
                                        <dockerDirectory>${dockerLocation}</dockerDirectory>
                                        <serverId>docker-hub</serverId>
                                        <imageTags>
                                                <imageTag>latest</imageTag>
                                        </imageTags>
                                        <forceTags>true</forceTags>
-                               </configuration>
+                               <resources>
+                                       <resource>
+                                         <targetPath>/</targetPath>
+                                         <directory>${project.build.directory}/opt</directory>
+                                         <include>${project.build.finalName}.jar</include>
+                                       </resource>
+                                       <resource>
+                                         <targetPath>/</targetPath>
+                                         <directory>${project.build.directory}</directory>
+                                         <include>**/**</include>
+                                       </resource>
+                                 </resources>
+                                </configuration>
+                               <executions>
+                          <execution>
+                                       <id>build-image</id>
+                                       <phase>package</phase>
+                                       <goals>
+                                         <goal>build</goal>
+                                       </goals>
+                                       <configuration>
+                                         <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
+                                       </configuration>
+                                 </execution> 
+
+                                 <execution>
+                                       <id>tag-image-project-version</id>
+                                       <phase>package</phase>
+                                       <goals>
+                                         <goal>tag</goal>
+                                       </goals>
+                                       <configuration>
+                                         <image>onap/dmaap/dmaap-mr</image>
+                                         <newName>${docker.push.registry}/onap/dmaap/dmaap-mr:${project.version}</newName>
+                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
+                                       </configuration>
+                                 </execution>
+                                 
+                                 <execution>
+                                       <id>tag-image-latest</id>
+                                       <phase>package</phase>
+                                       <goals>
+                                         <goal>tag</goal>
+                                       </goals>
+                                       <configuration>
+                                         <image>onap/dmaap/dmaap-mr</image>
+                                         <newName>${docker.push.registry}/onap/dmaap/dmaap-mr:latest</newName>
+                                         <skipDockerTag>${skip.docker.push}</skipDockerTag>
+                                       </configuration>
+                                 </execution>
+                                 
+                                <execution>
+                                       <id>push-image-latest</id>
+                                       <phase>deploy</phase>
+                                       <goals>
+                                         <goal>push</goal>
+                                       </goals>
+                                       <configuration>
+                                         <imageName>${docker.push.registry}/onap/dmaap/dmaap-mr:${project.version}</imageName>
+                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
+                                       </configuration>
+                                 </execution>
+                                 
+                                 <execution>
+                                       <id>push-image</id>
+                                       <phase>deploy</phase>
+                                       <goals>
+                                         <goal>push</goal>
+                                       </goals>
+                                       <configuration>
+                                         <imageName>${docker.push.registry}/onap/dmaap/dmaap-mr:latest</imageName>
+                                         <skipDockerPush>${skip.docker.push}</skipDockerPush>
+                                       </configuration>
+                                 </execution>
+                               </executions>
                        </plugin>                                                                                                                                                                                                                                                                                                        
                        <plugin>
                                <groupId>com.blackducksoftware.integration</groupId>
                <dmaapImg>1.0.2-SNAPSHOT</dmaapImg>
                <camel.version>2.15.5</camel.version>
                <sitePath>/content/sites/site/org/onap/dmaap/${project.artifactId}/${project.version}</sitePath>
+               <skip.docker.build>true</skip.docker.build>
+        <skip.docker.push>true</skip.docker.push>
+               <nexusproxy>https://nexus.onap.org</nexusproxy>
        </properties>
 
        <!-- Distribution management -->
                <!-- Use this profile to run the AJSC locally. This profile can be successfully 
                        shutdown WITHIN eclipse even in a Windows environment. Debugging is also 
                        available with this profile. -->
+       <profile>
+      <id>docker</id>
+      <properties>
+        <skip.staging.artifacts>true</skip.staging.artifacts>
+        <skip.docker.build>false</skip.docker.build>
+        <skip.docker.tag>false</skip.docker.tag>
+        <skip.docker.push>false</skip.docker.push>
+      </properties>
+    </profile>
+       
                <profile>
                        <id>runAjsc</id>
                        <build>