Modify Authz-service pom file to releaser docker 49/14849/1
authorsg481n <sg481n@att.com>
Sun, 24 Sep 2017 02:12:15 +0000 (02:12 +0000)
committersg481n <sg481n@att.com>
Sun, 24 Sep 2017 02:15:31 +0000 (02:15 +0000)
POM file updated in authz-service to release docker image of AAF.
profile added to pom file.

Change-Id: I5799333e7e966cdabe217371c7073b04b5ec2430
Issue-id: AAF-59
Signed-off-by: sg481n <sg481n@att.com>
authz-service/pom.xml

index 674f410..607f161 100644 (file)
@@ -70,6 +70,9 @@
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>\r
                <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>\r
                <sitePath>/content/sites/site/org/onap/aaf/authz/${project.artifactId}/${project.version}</sitePath>\r
+        <skip.docker.build>false</skip.docker.build>\r
+        <skip.docker.tag>false</skip.docker.tag>\r
+        <skip.docker.push>false</skip.docker.push>\r
        </properties>\r
        \r
                \r
                </dependency>   \r
        </dependencies>\r
 \r
-       \r
+       <profiles>\r
+    <profile>\r
+      \r
        <build>\r
            <plugins>\r
                \r
-                       <plugin>\r
+               <plugin>\r
                 <groupId>com.spotify</groupId>\r
                 <artifactId>docker-maven-plugin</artifactId>\r
                 <version>0.4.11</version>\r
                 <configuration>\r
                     <imageName>onap/aaf/authz-service</imageName>\r
                     <dockerDirectory>${dockerLocation}</dockerDirectory>\r
-                    <serverId>docker-hub</serverId>\r
-                     <registryUrl>https://${docker.registry}</registryUrl>\r
+                                       <serverId>docker-hub</serverId>\r
                     <imageTags>\r
                         <imageTag>${project.version}</imageTag>\r
                         <imageTag>latest</imageTag>\r
                     </imageTags>\r
+                                        <forceTags>true</forceTags>\r
                                             <resources>\r
                                 <resource>\r
                                                                <targetPath>/</targetPath>\r
                                         <include>**/*</include>\r
                                     </includes>\r
                                 </resource>\r
-                            </resources>\r
-                    <forceTags>true</forceTags>\r
+                            </resources>                  \r
                 </configuration>\r
+                               <executions>\r
+          <execution>\r
+            <id>build-image</id>\r
+            <phase>package</phase>\r
+            <goals>\r
+              <goal>build</goal>\r
+            </goals>\r
+            <configuration>\r
+              <skipDockerBuild>${skip.docker.build}</skipDockerBuild>\r
+              <buildArgs>\r
+                <http_proxy>${env.HTTP_PROXY}</http_proxy>\r
+                <https_proxy>${env.HTTPS_PROXY}</https_proxy>\r
+              </buildArgs>\r
+            </configuration>\r
+          </execution>\r
+                 <execution>\r
+            <id>docker</id>\r
+            <phase>deploy</phase>\r
+            <goals>\r
+              <goal>push</goal>\r
+            </goals>\r
+            <configuration>\r
+              <imageName>onap/aaf/authz-service</imageName>\r
+              <skipDockerPush>${skip.docker.push}</skipDockerPush>\r
+            </configuration>\r
+          </execution>\r
+          \r
+                 </executions>\r
             </plugin>\r
+                       \r
+                       \r
                        <plugin>\r
-    <artifactId>maven-resources-plugin</artifactId>\r
-    <version>2.7</version>\r
-    <executions>\r
-        <execution>\r
+                <artifactId>maven-resources-plugin</artifactId>\r
+                <version>2.7</version>\r
+              <executions>\r
+                     <execution>\r
                         <id>copy-docker-file</id>\r
                         <phase>package</phase>\r
                         <goals>\r
                        </plugins>\r
 \r
        </build>\r
-       <profiles>\r
-    <profile>\r
-      <id>docker</id>\r
-      <properties>\r
-        <skip.staging.artifacts>true</skip.staging.artifacts>\r
-        <skip.docker.build>false</skip.docker.build>\r
-        <skip.docker.tag>false</skip.docker.tag>\r
-        <skip.docker.push>false</skip.docker.push>\r
-      </properties>\r
     </profile>\r
   </profiles>\r
 \r