Created maven modules for aai-common docker images. 20/93620/1
authorDmitry Puzikov <dmitry.puzikov@tieto.com>
Thu, 15 Aug 2019 11:45:56 +0000 (13:45 +0200)
committerDmitry Puzikov <dmitry.puzikov@tieto.com>
Thu, 15 Aug 2019 11:45:56 +0000 (13:45 +0200)
aai-common and aai-haproxy docker images can be build with maven.

Change-Id: Iffbc2f4984316e3acc35558bdde0dbea76388ada
Issue-ID: INT-1023
Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
13 files changed:
aai-common-docker/aai-common-images/README.md [moved from Dockerfiles/aai-common/README.md with 100% similarity]
aai-common-docker/aai-common-images/pom.xml [new file with mode: 0644]
aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine [moved from Dockerfiles/aai-common/Dockerfile.alpine with 100% similarity]
aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu [moved from Dockerfiles/aai-common/Dockerfile.ubuntu with 100% similarity]
aai-common-docker/aai-haproxy-image/README.md [moved from Dockerfiles/haproxy/README.md with 100% similarity]
aai-common-docker/aai-haproxy-image/pom.xml [new file with mode: 0644]
aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile [moved from Dockerfiles/haproxy/Dockerfile with 100% similarity]
aai-common-docker/aai-haproxy-image/src/main/docker/aai.pem [moved from Dockerfiles/haproxy/aai.pem with 100% similarity]
aai-common-docker/aai-haproxy-image/src/main/docker/docker-entrypoint.sh [moved from Dockerfiles/haproxy/docker-entrypoint.sh with 100% similarity]
aai-common-docker/aai-haproxy-image/src/main/docker/haproxy.cfg [moved from Dockerfiles/haproxy/haproxy.cfg with 100% similarity]
aai-common-docker/aai-haproxy-image/src/main/docker/resolvers.conf [moved from Dockerfiles/haproxy/resolvers.conf with 100% similarity]
aai-common-docker/pom.xml [new file with mode: 0644]
pom.xml

diff --git a/aai-common-docker/aai-common-images/pom.xml b/aai-common-docker/aai-common-images/pom.xml
new file mode 100644 (file)
index 0000000..2ecf029
--- /dev/null
@@ -0,0 +1,103 @@
+<!--
+
+    ============LICENSE_START=======================================================
+    org.onap.aai
+    ================================================================================
+    Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+    ================================================================================
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ============LICENSE_END=========================================================
+
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.aai.aai-common</groupId>
+        <artifactId>aai-common-docker</artifactId>
+        <version>1.6.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>aai-common-images</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>aai-aai-common-images</name>
+    <description>Contains dockerfiles for aai-common images (alpine and ubuntu based).</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>${docker.fabric.version}</version>
+                <configuration>
+                    <verbose>true</verbose>
+                    <apiVersion>1.23</apiVersion>
+                    <images>
+                        <image>
+                            <name>${docker.push.registry}/${aai.docker.namespace}/aai-common-alpine:%l
+                            </name>
+                            <build>
+                                <filter>@</filter>
+                                <tags>
+                                    <tag>latest</tag>
+                                </tags>
+                                <cleanup>try</cleanup>
+                                <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
+                                <dockerFile>Dockerfile.alpine</dockerFile>
+                            </build>
+                        </image>
+                        <image>
+                            <name>${docker.push.registry}/${aai.docker.namespace}/aai-common-ubuntu:%l
+                            </name>
+                            <build>
+                                <filter>@</filter>
+                                <tags>
+                                    <tag>latest</tag>
+                                </tags>
+                                <cleanup>try</cleanup>
+                                <dockerFile>Dockerfile.ubuntu</dockerFile>
+                                <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>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>push-images</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>push</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/aai-common-docker/aai-haproxy-image/pom.xml b/aai-common-docker/aai-haproxy-image/pom.xml
new file mode 100644 (file)
index 0000000..3a37200
--- /dev/null
@@ -0,0 +1,89 @@
+<!--
+
+    ============LICENSE_START=======================================================
+    org.onap.aai
+    ================================================================================
+    Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+    ================================================================================
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ============LICENSE_END=========================================================
+
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.aai.aai-common</groupId>
+        <artifactId>aai-common-docker</artifactId>
+        <version>1.6.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>aai-haproxy-image</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>aai-aai-haproxy-image</name>
+    <description>Contains dockerfiles for aai-haproxy image.</description>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.fabric8</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>${docker.fabric.version}</version>
+                <configuration>
+                    <verbose>true</verbose>
+                    <apiVersion>1.23</apiVersion>
+                    <images>
+                        <image>
+                            <name>${docker.push.registry}/${aai.docker.namespace}/aai-haproxy:%l
+                            </name>
+                            <build>
+                                <filter>@</filter>
+                                <tags>
+                                    <tag>latest</tag>
+                                </tags>
+                                <cleanup>try</cleanup>
+                                <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>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>push-images</id>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>push</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/aai-common-docker/pom.xml b/aai-common-docker/pom.xml
new file mode 100644 (file)
index 0000000..82671e0
--- /dev/null
@@ -0,0 +1,63 @@
+<!--
+
+    ============LICENSE_START=======================================================
+    org.onap.aai
+    ================================================================================
+    Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+    ================================================================================
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+    ============LICENSE_END=========================================================
+
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.onap.aai.aai-common</groupId>
+        <artifactId>aai-common</artifactId>
+        <version>1.6.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>aai-common-docker</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>aai-aai-common-docker</name>
+    <description>Contains dockerfiles for aai common images.</description>
+    <properties>
+        <aai.docker.namespace>onap</aai.docker.namespace>
+        <aai.build.directory>${project.build.directory}/${project.artifactId}-build/
+        </aai.build.directory>
+        <docker.fabric.version>0.28.0</docker.fabric.version>
+    </properties>
+
+    <modules>
+        <module>aai-common-images</module>
+        <module>aai-haproxy-image</module>
+    </modules>
+
+    <build>
+        <plugins>
+            <!-- license plugin -->
+            <plugin>
+                <groupId>com.mycila</groupId>
+                <artifactId>license-maven-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-site-plugin</artifactId>
+                <version>3.3</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/pom.xml b/pom.xml
index 222c8e1..112aed7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <module>aai-utils</module>
     </modules>
 
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <modules>
+                <module>aai-common-docker</module>
+            </modules>
+        </profile>
+    </profiles>
+
     <properties>
         <aai.generate.schema>true</aai.generate.schema>
         <sitePath>/content/sites/site/org/onap/aai/aai-common/${project.artifactId}/${project.version}</sitePath>
                 Using https://code.revelc.net/formatter-maven-plugin/ for Eclipse formatter
                 Using https://github.com/diffplug/spotless/tree/master/plugin-maven for import order
                 Use in combination to rewrite code and imports, then checkstyle
-                
+
                 mvn formatter:format spotless:apply process-sources
                 -->
                 <plugin>
-                     <groupId>net.revelc.code.formatter</groupId>
-                     <artifactId>formatter-maven-plugin</artifactId>
-                     <version>2.8.1</version>
-                     <configuration>
+                    <groupId>net.revelc.code.formatter</groupId>
+                    <artifactId>formatter-maven-plugin</artifactId>
+                    <version>2.8.1</version>
+                    <configuration>
                         <configFile>${project.parent.basedir}/onap-java-formatter.xml</configFile>
-                     </configuration>
-                     <!-- https://code.revelc.net/formatter-maven-plugin/
-                          use mvn formatter:format to rewrite source files
-                          use mvn formatter:validate to validate source files -->
-                 </plugin>
+                    </configuration>
+                    <!-- https://code.revelc.net/formatter-maven-plugin/
+                         use mvn formatter:format to rewrite source files
+                         use mvn formatter:validate to validate source files -->
+                </plugin>
                 <plugin>
-                  <groupId>com.diffplug.spotless</groupId>
-                  <artifactId>spotless-maven-plugin</artifactId>
-                  <version>1.18.0</version>
-                  <configuration>
-                    <java>
-                     <importOrder>
-                       <order>com,java,javax,org</order>
-                     </importOrder>
-                    </java>
-                  </configuration>
-                <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
-                     use mvn spotless:apply to rewrite source files
-                     use mvn spotless:check to validate source files -->
+                    <groupId>com.diffplug.spotless</groupId>
+                    <artifactId>spotless-maven-plugin</artifactId>
+                    <version>1.18.0</version>
+                    <configuration>
+                        <java>
+                            <importOrder>
+                                <order>com,java,javax,org</order>
+                            </importOrder>
+                        </java>
+                    </configuration>
+                    <!-- https://github.com/diffplug/spotless/tree/master/plugin-maven
+                         use mvn spotless:apply to rewrite source files
+                         use mvn spotless:check to validate source files -->
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>