Copying files to docker image 51/60051/1
authorPrudence Au <prudence.au@amdocs.com>
Fri, 10 Aug 2018 17:06:45 +0000 (13:06 -0400)
committerPrudence Au <prudence.au@amdocs.com>
Fri, 10 Aug 2018 17:06:55 +0000 (13:06 -0400)
Change-Id: If935e70dea655fcd64522cbe0b4a597073efec63
Issue-ID: LOG-519
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
pom.xml

diff --git a/pom.xml b/pom.xml
index 3098d9d..a8b4f1d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                        </execution>
                                </executions>
                        </plugin>
-                       <!--<plugin>
-                               <groupId>com.spotify</groupId>
-                               <artifactId>docker-maven-plugin</artifactId>
-                               <version>0.4.11</version>
-                               <dependencies>
-                                       <dependency>
-                                               <groupId>com.github.jnr</groupId>
-                                               <artifactId>jnr-unixsocket</artifactId>
-                                               <version>0.13</version>
-                                       </dependency>
-                               </dependencies>
-                               <configuration>
-                                       <verbose>true</verbose>
-                                       <serverId>docker-hub</serverId>
-                                       <imageName>${docker.push.registry}/onap/${project.artifactId}</imageName>
-                                       <dockerDirectory>${docker.location}</dockerDirectory>
-                                       <imageTags>
-                                               <imageTag>latest</imageTag>
-                                       </imageTags>
-                                       <forceTags>true</forceTags>
-                               </configuration>
-                       </plugin>-->
                        <plugin>
                                <groupId>org.springframework.boot</groupId>
                                <artifactId>spring-boot-maven-plugin</artifactId>
             <configuration>
                 <verbose>true</verbose>
                 <apiVersion>1.23</apiVersion>
-                <!-- <pullRegistry>${docker.pull.registry}</pullRegistry>
-                <pushRegistry>${docker.push.registry}</pushRegistry>
-                <dockerHost>${docker.pull.registry}</dockerHost> -->
                 <images>
                     <image>
                         <name>onap/${project.artifactId}</name>
                         <build>
                             <cleanup>try</cleanup>
                             <dockerFileDir>${project.basedir}/target/docker-stage</dockerFileDir>
-                                                       <!-- <dockerFile>${project.basedir}/target/docker-stage/Dockerfile</dockerFile> -->
                             <tags>
                                 <tag>${docker.snapshot.tag}</tag>
                                 <tag>${docker.latest.tag}</tag>
                             </tags>
-                            <!-- <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir> -->
                         </build>
                     </image>
                 </images>
             </configuration>
             <executions>
-                <!-- <execution>
-                   <id>clean-images</id>
-                    <phase>pre-clean</phase>
-                    <goals>
-                        <goal>remove</goal>
-                    </goals>
-                    <configuration>
-                        <removeAll>true</removeAll>
-                    </configuration>
-                </execution> -->
-
-                <execution>
-                    <id>generate-images</id>
-                    <!-- <phase>package</phase> -->
-                    <phase>generate-sources</phase>
-                    <goals>
-                        <goal>build</goal>
-                    </goals>
-                </execution>
-                <execution>
-                    <id>push-images</id>
-                    <phase>deploy</phase>
-                    <goals>
-                        <goal>build</goal>
-                        <goal>push</goal>
-                    </goals>
-                    <!--<configuration>
-                        <image>onap/vvp/cms</image>
-                    </configuration>  -->
-                </execution>
-            </executions>
-        </plugin>
-        <plugin>
-                               <artifactId>maven-resources-plugin</artifactId>
-                               <version>2.6</version>
-                               <executions>
-                                       <execution>
-                                               <id>copy-dockerfile</id>
-                                               <goals>
-                                                       <goal>copy-resources</goal>
-                                               </goals><!-- here the phase you need -->
-                                               <phase>validate</phase>
+                       <execution>
+                               <id>generate-images</id>
+                <phase>generate-sources</phase>
+                <goals>
+                       <goal>build</goal>
+                </goals>
+            </execution>
+            <execution>
+                               <id>push-images</id>
+               <phase>deploy</phase>
+               <goals>
+                               <goal>build</goal>
+                    <goal>push</goal>
+                               </goals>
+                       </execution>
+               </executions>
+       </plugin>
+       <plugin>
+               <artifactId>maven-resources-plugin</artifactId>
+               <version>2.6</version>
+               <executions>
+                       <execution>
+                               <id>copy-dockerfile</id>
+                                       <goals>
+                                               <goal>copy-resources</goal>
+                                       </goals><!-- here the phase you need -->
+                                       <phase>validate</phase>
                                                <configuration>
-                                                       <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+                                                       <outputDirectory>${project.basedir}/target/docker-stage</outputDirectory>
                                                        <resources>
                                                                <resource>
                                                                        <directory>src/main/docker</directory>
                                                        </resources>
                                                </configuration>
                                        </execution>
-                                       <!-- <execution>
+                                       <execution>
                                                <id>copy-properties</id>
                                                <goals>
                                                        <goal>copy-resources</goal>
                                                </goals>
                                                <phase>validate</phase>
                                                <configuration>
-                                                       <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory>
+                                                       <outputDirectory>${project.basedir}/target/docker-stage/opt/app/config</outputDirectory>
                                                        <resources>
                                                                <resource>
-                                                                       <directory>../src/main/properties</directory>
+                                                                       <directory>../config</directory>
                                                                        <includes>
                                                                                <include>*.properties</include>
-                                                                               <include>*.properties.sdnctldb01</include>
+                                                                               <include>builders/*.properties</include>
+                                                                               <include>*.xml</include>
+                                                                       </includes>
+                                                                       <filtering>false</filtering>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>copy-script</id>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <phase>validate</phase>
+                                               <configuration>
+                                                       <outputDirectory>${project.basedir}/target/docker-stage/opt/app/bin</outputDirectory>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>src/main/docker</directory>
+                                                                       <includes>
+                                                                               <include>*.sh</include>
+                                                                       </includes>
+                                                                       <filtering>false</filtering>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+                                       <execution>
+                                               <id>copy-jar</id>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <phase>validate</phase>
+                                               <configuration>
+                                                       <outputDirectory>${project.basedir}/target/docker-stage/opt/app/lib</outputDirectory>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>../target/</directory>
+                                                                       <includes>
+                                                                               <include>*.jar</include>
                                                                        </includes>
                                                                        <filtering>false</filtering>
                                                                </resource>
                                                        </resources>
                                                </configuration>
-                                       </execution>-->
+                                       </execution>
                                </executions>
                        </plugin>
         </plugins>