From 649585b88b758d5c3e702446385ffe733ceea824 Mon Sep 17 00:00:00 2001 From: Dmitry Puzikov Date: Thu, 15 Aug 2019 13:45:56 +0200 Subject: [PATCH] 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 --- .../aai-common-images}/README.md | 0 aai-common-docker/aai-common-images/pom.xml | 103 +++++++++++++++++++++ .../src/main/docker}/Dockerfile.alpine | 0 .../src/main/docker}/Dockerfile.ubuntu | 0 .../aai-haproxy-image}/README.md | 0 aai-common-docker/aai-haproxy-image/pom.xml | 89 ++++++++++++++++++ .../aai-haproxy-image/src/main/docker}/Dockerfile | 0 .../aai-haproxy-image/src/main/docker}/aai.pem | 0 .../src/main/docker}/docker-entrypoint.sh | 0 .../aai-haproxy-image/src/main/docker}/haproxy.cfg | 0 .../src/main/docker}/resolvers.conf | 0 aai-common-docker/pom.xml | 63 +++++++++++++ pom.xml | 55 ++++++----- 13 files changed, 287 insertions(+), 23 deletions(-) rename {Dockerfiles/aai-common => aai-common-docker/aai-common-images}/README.md (100%) create mode 100644 aai-common-docker/aai-common-images/pom.xml rename {Dockerfiles/aai-common => aai-common-docker/aai-common-images/src/main/docker}/Dockerfile.alpine (100%) rename {Dockerfiles/aai-common => aai-common-docker/aai-common-images/src/main/docker}/Dockerfile.ubuntu (100%) rename {Dockerfiles/haproxy => aai-common-docker/aai-haproxy-image}/README.md (100%) create mode 100644 aai-common-docker/aai-haproxy-image/pom.xml rename {Dockerfiles/haproxy => aai-common-docker/aai-haproxy-image/src/main/docker}/Dockerfile (100%) rename {Dockerfiles/haproxy => aai-common-docker/aai-haproxy-image/src/main/docker}/aai.pem (100%) rename {Dockerfiles/haproxy => aai-common-docker/aai-haproxy-image/src/main/docker}/docker-entrypoint.sh (100%) rename {Dockerfiles/haproxy => aai-common-docker/aai-haproxy-image/src/main/docker}/haproxy.cfg (100%) rename {Dockerfiles/haproxy => aai-common-docker/aai-haproxy-image/src/main/docker}/resolvers.conf (100%) create mode 100644 aai-common-docker/pom.xml diff --git a/Dockerfiles/aai-common/README.md b/aai-common-docker/aai-common-images/README.md similarity index 100% rename from Dockerfiles/aai-common/README.md rename to 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 @@ + + + 4.0.0 + + org.onap.aai.aai-common + aai-common-docker + 1.6.0-SNAPSHOT + + + aai-common-images + 1.6.0-SNAPSHOT + pom + aai-aai-common-images + Contains dockerfiles for aai-common images (alpine and ubuntu based). + + + + io.fabric8 + docker-maven-plugin + ${docker.fabric.version} + + true + 1.23 + + + ${docker.push.registry}/${aai.docker.namespace}/aai-common-alpine:%l + + + @ + + latest + + try + ${project.basedir}/src/main/docker + Dockerfile.alpine + + + + ${docker.push.registry}/${aai.docker.namespace}/aai-common-ubuntu:%l + + + @ + + latest + + try + Dockerfile.ubuntu + ${project.basedir}/src/main/docker + + + + + + + clean-images + pre-clean + + remove + + + true + + + + generate-images + package + + build + + + + push-images + deploy + + push + + + + + + + diff --git a/Dockerfiles/aai-common/Dockerfile.alpine b/aai-common-docker/aai-common-images/src/main/docker/Dockerfile.alpine similarity index 100% rename from Dockerfiles/aai-common/Dockerfile.alpine rename to 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 similarity index 100% rename from Dockerfiles/aai-common/Dockerfile.ubuntu rename to 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 similarity index 100% rename from Dockerfiles/haproxy/README.md rename to 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 @@ + + + 4.0.0 + + org.onap.aai.aai-common + aai-common-docker + 1.6.0-SNAPSHOT + + + aai-haproxy-image + 1.6.0-SNAPSHOT + pom + aai-aai-haproxy-image + Contains dockerfiles for aai-haproxy image. + + + + io.fabric8 + docker-maven-plugin + ${docker.fabric.version} + + true + 1.23 + + + ${docker.push.registry}/${aai.docker.namespace}/aai-haproxy:%l + + + @ + + latest + + try + ${project.basedir}/src/main/docker + + + + + + + clean-images + pre-clean + + remove + + + true + + + + generate-images + package + + build + + + + push-images + deploy + + push + + + + + + + diff --git a/Dockerfiles/haproxy/Dockerfile b/aai-common-docker/aai-haproxy-image/src/main/docker/Dockerfile similarity index 100% rename from Dockerfiles/haproxy/Dockerfile rename to 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 similarity index 100% rename from Dockerfiles/haproxy/aai.pem rename to 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 similarity index 100% rename from Dockerfiles/haproxy/docker-entrypoint.sh rename to 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 similarity index 100% rename from Dockerfiles/haproxy/haproxy.cfg rename to 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 similarity index 100% rename from Dockerfiles/haproxy/resolvers.conf rename to 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 @@ + + + 4.0.0 + + org.onap.aai.aai-common + aai-common + 1.6.0-SNAPSHOT + + + aai-common-docker + 1.6.0-SNAPSHOT + pom + aai-aai-common-docker + Contains dockerfiles for aai common images. + + onap + ${project.build.directory}/${project.artifactId}-build/ + + 0.28.0 + + + + aai-common-images + aai-haproxy-image + + + + + + + com.mycila + license-maven-plugin + + + + org.apache.maven.plugins + maven-site-plugin + 3.3 + + + + diff --git a/pom.xml b/pom.xml index 222c8e12..112aed78 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,15 @@ aai-utils + + + docker + + aai-common-docker + + + + true /content/sites/site/org/onap/aai/aai-common/${project.artifactId}/${project.version} @@ -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 --> - net.revelc.code.formatter - formatter-maven-plugin - 2.8.1 - + net.revelc.code.formatter + formatter-maven-plugin + 2.8.1 + ${project.parent.basedir}/onap-java-formatter.xml - - - + + + - com.diffplug.spotless - spotless-maven-plugin - 1.18.0 - - - - com,java,javax,org - - - - + com.diffplug.spotless + spotless-maven-plugin + 1.18.0 + + + + com,java,javax,org + + + + org.apache.maven.plugins -- 2.16.6