summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Puzikov <dmitry.puzikov@tieto.com>2019-08-15 13:45:56 +0200
committerDmitry Puzikov <dmitry.puzikov@tieto.com>2019-08-15 13:45:56 +0200
commit649585b88b758d5c3e702446385ffe733ceea824 (patch)
tree70c4de510446414ee72e8c6a2e59f9f5b6f0bc7c
parentfff2d1af7b401d6334c4b09868597dcc6c054e2b (diff)
Created maven modules for aai-common docker images.
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>
-rw-r--r--aai-common-docker/aai-common-images/README.md (renamed from Dockerfiles/aai-common/README.md)0
-rw-r--r--aai-common-docker/aai-common-images/pom.xml103
-rw-r--r--aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine (renamed from Dockerfiles/aai-common/Dockerfile.alpine)0
-rw-r--r--aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu (renamed from Dockerfiles/aai-common/Dockerfile.ubuntu)0
-rw-r--r--aai-common-docker/aai-haproxy-image/README.md (renamed from Dockerfiles/haproxy/README.md)0
-rw-r--r--aai-common-docker/aai-haproxy-image/pom.xml89
-rw-r--r--aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile (renamed from Dockerfiles/haproxy/Dockerfile)0
-rw-r--r--aai-common-docker/aai-haproxy-image/src/main/docker/aai.pem (renamed from Dockerfiles/haproxy/aai.pem)0
-rw-r--r--aai-common-docker/aai-haproxy-image/src/main/docker/docker-entrypoint.sh (renamed from Dockerfiles/haproxy/docker-entrypoint.sh)0
-rw-r--r--aai-common-docker/aai-haproxy-image/src/main/docker/haproxy.cfg (renamed from Dockerfiles/haproxy/haproxy.cfg)0
-rw-r--r--aai-common-docker/aai-haproxy-image/src/main/docker/resolvers.conf (renamed from Dockerfiles/haproxy/resolvers.conf)0
-rw-r--r--aai-common-docker/pom.xml63
-rw-r--r--pom.xml55
13 files changed, 287 insertions, 23 deletions
diff --git a/Dockerfiles/aai-common/README.md b/aai-common-docker/aai-common-images/README.md
index 82131247..82131247 100644
--- a/Dockerfiles/aai-common/README.md
+++ b/aai-common-docker/aai-common-images/README.md
diff --git a/aai-common-docker/aai-common-images/pom.xml b/aai-common-docker/aai-common-images/pom.xml
new file mode 100644
index 00000000..2ecf0295
--- /dev/null
+++ b/aai-common-docker/aai-common-images/pom.xml
@@ -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/Dockerfiles/aai-common/Dockerfile.alpine b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine
index 915c511e..915c511e 100644
--- a/Dockerfiles/aai-common/Dockerfile.alpine
+++ b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine
diff --git a/Dockerfiles/aai-common/Dockerfile.ubuntu b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu
index d81579d4..d81579d4 100644
--- a/Dockerfiles/aai-common/Dockerfile.ubuntu
+++ b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.ubuntu
diff --git a/Dockerfiles/haproxy/README.md b/aai-common-docker/aai-haproxy-image/README.md
index 4d677051..4d677051 100644
--- a/Dockerfiles/haproxy/README.md
+++ b/aai-common-docker/aai-haproxy-image/README.md
diff --git a/aai-common-docker/aai-haproxy-image/pom.xml b/aai-common-docker/aai-haproxy-image/pom.xml
new file mode 100644
index 00000000..3a37200b
--- /dev/null
+++ b/aai-common-docker/aai-haproxy-image/pom.xml
@@ -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/Dockerfiles/haproxy/Dockerfile b/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile
index 7bf9b20a..7bf9b20a 100644
--- a/Dockerfiles/haproxy/Dockerfile
+++ b/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile
diff --git a/Dockerfiles/haproxy/aai.pem b/aai-common-docker/aai-haproxy-image/src/main/docker/aai.pem
index c17dcf8b..c17dcf8b 100644
--- a/Dockerfiles/haproxy/aai.pem
+++ b/aai-common-docker/aai-haproxy-image/src/main/docker/aai.pem
diff --git a/Dockerfiles/haproxy/docker-entrypoint.sh b/aai-common-docker/aai-haproxy-image/src/main/docker/docker-entrypoint.sh
index 9095b3d1..9095b3d1 100644
--- a/Dockerfiles/haproxy/docker-entrypoint.sh
+++ b/aai-common-docker/aai-haproxy-image/src/main/docker/docker-entrypoint.sh
diff --git a/Dockerfiles/haproxy/haproxy.cfg b/aai-common-docker/aai-haproxy-image/src/main/docker/haproxy.cfg
index 8a4001e9..8a4001e9 100644
--- a/Dockerfiles/haproxy/haproxy.cfg
+++ b/aai-common-docker/aai-haproxy-image/src/main/docker/haproxy.cfg
diff --git a/Dockerfiles/haproxy/resolvers.conf b/aai-common-docker/aai-haproxy-image/src/main/docker/resolvers.conf
index f996fa76..f996fa76 100644
--- a/Dockerfiles/haproxy/resolvers.conf
+++ b/aai-common-docker/aai-haproxy-image/src/main/docker/resolvers.conf
diff --git a/aai-common-docker/pom.xml b/aai-common-docker/pom.xml
new file mode 100644
index 00000000..82671e0e
--- /dev/null
+++ b/aai-common-docker/pom.xml
@@ -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 222c8e12..112aed78 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,15 @@
<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>
@@ -61,34 +70,34 @@
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>