diff options
author | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-08-23 15:54:30 +0000 |
---|---|---|
committer | Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com> | 2018-08-23 15:57:47 +0000 |
commit | d3efe7295b3bbe08d240d3719eb5a2c5d0b3c12d (patch) | |
tree | e76426f74104d89f7a82d5389328f8d75fd8692c | |
parent | 9221702b86540d7fb44aa6185fef6f15602d7838 (diff) |
Controller Blueprints Microservice
Add Docker Build and Deploy Maven Implementations for Controller Blueprint MS and their dependencies
Change-Id: I9eee9fff535bcc9ca0b855150892ce53af126d1c
Issue-ID: CCSDK-483
Signed-off-by: Muthuramalingam, Brinda Santh(bs2796) <bs2796@att.com>
29 files changed, 363 insertions, 131 deletions
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml index ea422600..1412ecae 100644 --- a/ms/blueprintsprocessor/application/pom.xml +++ b/ms/blueprintsprocessor/application/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>parent</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> <relativePath>../parent</relativePath> </parent> <artifactId>application</artifactId> diff --git a/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml b/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml index efd7d74b..a4670517 100644 --- a/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/adaptors/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>commons</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>adaptors</artifactId> diff --git a/ms/blueprintsprocessor/modules/commons/core/pom.xml b/ms/blueprintsprocessor/modules/commons/core/pom.xml index a601560b..d0203208 100644 --- a/ms/blueprintsprocessor/modules/commons/core/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/core/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>commons</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>core</artifactId> @@ -38,8 +38,8 @@ <artifactId>rest-lib</artifactId> </dependency> <dependency> - <groupId>org.onap.ccsdk.apps</groupId> - <artifactId>controllerblueprints-resource-dict</artifactId> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>resource-dict</artifactId> </dependency> </dependencies> </project> diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml index 31abb40d..a8ece15d 100644 --- a/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/db-lib/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>commons</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>db-lib</artifactId> diff --git a/ms/blueprintsprocessor/modules/commons/pom.xml b/ms/blueprintsprocessor/modules/commons/pom.xml index 83a3cb8b..00b7e5f3 100644 --- a/ms/blueprintsprocessor/modules/commons/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>modules</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>commons</artifactId> diff --git a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml index d671f120..27a1a1d7 100644 --- a/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml +++ b/ms/blueprintsprocessor/modules/commons/rest-lib/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>commons</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>rest-lib</artifactId> diff --git a/ms/blueprintsprocessor/modules/inbounds/pom.xml b/ms/blueprintsprocessor/modules/inbounds/pom.xml index 1b9d2782..fd2b9fa2 100644 --- a/ms/blueprintsprocessor/modules/inbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>modules</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>inbounds</artifactId> diff --git a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml index 6ed7c9da..32b72178 100644 --- a/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/resource-api/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>inbounds</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>resource-api</artifactId> diff --git a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml index a777c08c..7791b5d1 100644 --- a/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml +++ b/ms/blueprintsprocessor/modules/inbounds/selfservice-api/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>inbounds</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>selfservice-api</artifactId> diff --git a/ms/blueprintsprocessor/modules/outbounds/pom.xml b/ms/blueprintsprocessor/modules/outbounds/pom.xml index 213e516b..8a902622 100644 --- a/ms/blueprintsprocessor/modules/outbounds/pom.xml +++ b/ms/blueprintsprocessor/modules/outbounds/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>modules</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>outbounds</artifactId> diff --git a/ms/blueprintsprocessor/modules/pom.xml b/ms/blueprintsprocessor/modules/pom.xml index 68447436..c0c30e01 100644 --- a/ms/blueprintsprocessor/modules/pom.xml +++ b/ms/blueprintsprocessor/modules/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>parent</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> <relativePath>../parent</relativePath> </parent> diff --git a/ms/blueprintsprocessor/modules/services/db-service/pom.xml b/ms/blueprintsprocessor/modules/services/db-service/pom.xml index b11ba6d0..3c0d9e7c 100644 --- a/ms/blueprintsprocessor/modules/services/db-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/db-service/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>services</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>db-service</artifactId> diff --git a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml index c49476fd..b1bf8231 100644 --- a/ms/blueprintsprocessor/modules/services/execution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/execution-service/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>services</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>execution-service</artifactId> diff --git a/ms/blueprintsprocessor/modules/services/pom.xml b/ms/blueprintsprocessor/modules/services/pom.xml index 4ab8d00d..90a4446d 100644 --- a/ms/blueprintsprocessor/modules/services/pom.xml +++ b/ms/blueprintsprocessor/modules/services/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>modules</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>services</artifactId> diff --git a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml b/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml index 581dd14d..f25eb713 100644 --- a/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml +++ b/ms/blueprintsprocessor/modules/services/resolution-service/pom.xml @@ -20,7 +20,7 @@ <parent> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>services</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.3.0-SNAPSHOT</version> </parent> <artifactId>resolution-service</artifactId> <packaging>jar</packaging> diff --git a/ms/blueprintsprocessor/parent/pom.xml b/ms/blueprintsprocessor/parent/pom.xml index b6c8e0c3..79039aa3 100644 --- a/ms/blueprintsprocessor/parent/pom.xml +++ b/ms/blueprintsprocessor/parent/pom.xml @@ -16,27 +16,61 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> - <version>0.0.3-SNAPSHOT</version> <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.ccsdk.apps</groupId> + <artifactId>blueprintsprocessor</artifactId> + <version>0.3.0-SNAPSHOT</version> + </parent> + <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> <artifactId>parent</artifactId> <packaging>pom</packaging> <name>Blueprints Processor Parent</name> <description>Blueprints Processor Parent</description> <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <maven.compiler.target>1.8</maven.compiler.target> - <maven.compiler.source>1.8</maven.compiler.source> - <java.version>1.8</java.version> <controllerblueprints.version>0.3.0-SNAPSHOT</controllerblueprints.version> <spring.boot.version>2.0.4.RELEASE</spring.boot.version> + <spring.version>5.0.8.RELEASE</spring.version> <kotlin.version>1.2.60</kotlin.version> + <eelf.version>1.0.0</eelf.version> <springfox.swagger2.version>2.9.2</springfox.swagger2.version> <h2database.version>1.4.197</h2database.version> </properties> <dependencyManagement> <dependencies> + <!-- Spring Boot --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>${spring.boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <!-- Logging Dependencies --> + <dependency> + <groupId>com.att.eelf</groupId> + <artifactId>eelf-core</artifactId> + <version>${eelf.version}</version> + </dependency> + + <!-- Kotlin Dependencies --> + <dependency> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-stdlib</artifactId> + <version>${kotlin.version}</version> + </dependency> + <dependency> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-stdlib-jdk8</artifactId> + <version>${kotlin.version}</version> + </dependency> + <dependency> + <groupId>org.jetbrains.kotlin</groupId> + <artifactId>kotlin-reflect</artifactId> + <version>${kotlin.version}</version> + </dependency> + <!-- Application Module Dependencies --> <dependency> <groupId>org.onap.ccsdk.apps.blueprintsprocessor</groupId> @@ -81,8 +115,8 @@ <!-- Application Component Dependency --> <dependency> - <groupId>org.onap.ccsdk.apps</groupId> - <artifactId>controllerblueprints-resource-dict</artifactId> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>resource-dict</artifactId> <version>${controllerblueprints.version}</version> </dependency> @@ -98,25 +132,33 @@ <version>${springfox.swagger2.version}</version> </dependency> - <!-- Spring Boot --> - + <!-- Common Libs --> <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-parent</artifactId> - <version>${spring.boot.version}</version> - <type>pom</type> - <scope>import</scope> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.2.1</version> </dependency> <dependency> - <groupId>org.jetbrains.kotlin</groupId> - <artifactId>kotlin-stdlib-jdk8</artifactId> - <version>${kotlin.version}</version> + <groupId>commons-collections</groupId> + <artifactId>commons-collections</artifactId> + <version>3.2.2</version> </dependency> <dependency> - <groupId>org.jetbrains.kotlin</groupId> - <artifactId>kotlin-reflect</artifactId> - <version>${kotlin.version}</version> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.6</version> </dependency> + <dependency> + <groupId>org.apache.velocity</groupId> + <artifactId>velocity</artifactId> + <version>1.7</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>25.1-jre</version> + </dependency> + <!-- Database --> <dependency> <groupId>com.h2database</groupId> @@ -136,22 +178,18 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.2.1</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> - <version>3.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.6</version> </dependency> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> - <version>1.7</version> </dependency> <dependency> diff --git a/ms/blueprintsprocessor/pom.xml b/ms/blueprintsprocessor/pom.xml index 6c980be0..f35b105d 100644 --- a/ms/blueprintsprocessor/pom.xml +++ b/ms/blueprintsprocessor/pom.xml @@ -29,10 +29,15 @@ <description>Blueprints Processor POM</description> <properties> + <service.name>BlueprintsProcessor</service.name> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> + <build.number>${maven.build.timestamp}</build.number> + <java.version>1.8</java.version> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source> - <kotlin.version>1.2.60</kotlin.version> + <ccsdk.project.version>${project.version}</ccsdk.project.version> </properties> <modules> diff --git a/ms/controllerblueprints/application/pom.xml b/ms/controllerblueprints/application/pom.xml index 19fd9c72..4e781ad1 100644 --- a/ms/controllerblueprints/application/pom.xml +++ b/ms/controllerblueprints/application/pom.xml @@ -21,24 +21,18 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-parent</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
- <artifactId>controllerblueprints-application</artifactId>
+ <artifactId>application</artifactId>
<name>Controller Blueprints Application</name>
<properties>
<swagger.directory>${basedir}/src/main/resources/swagger-ui/dist</swagger.directory>
<java.version>1.8</java.version>
- <docker.registry>xxxxxxxxx:5100</docker.registry>
- <assembly.id>distribution</assembly.id>
- <build.number>local</build.number>
<name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
- <grm.namespace>org.onap.ccsdk.apps</grm.namespace>
- <archetypeVersion>200.0.49</archetypeVersion>
<serviceArtifactName>controllerblueprints</serviceArtifactName>
-
<!-- Sonar -->
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
@@ -50,15 +44,12 @@ <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
<sonar.language>java</sonar.language>
<ilib.version>2.0.7</ilib.version>
- <!--<skip.assembly>false</skip.assembly>-->
- <!--<skip.swagger.generation>false</skip.swagger.generation>-->
</properties>
<dependencies>
-
<dependency>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-service</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>service</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -102,17 +93,35 @@ </includes>
<filtering>true</filtering>
</resource>
- <resource>
- <directory>src/main/docker</directory>
- <targetPath>${basedir}/target</targetPath>
- <includes>
- <include>**/*</include>
- </includes>
- <filtering>true</filtering>
- </resource>
</resources>
<plugins>
<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>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>*</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
@@ -167,28 +176,6 @@ </executions>
</plugin>
<plugin>
- <!--build the final artifact for docker deployment -->
- <artifactId>maven-assembly-plugin</artifactId>
- <version>3.0.0</version>
- <configuration>
- <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
- <outputDirectory>target</outputDirectory>
- <descriptors>
- <descriptor>src/assembly/distribution.xml</descriptor>
- </descriptors>
- <tarLongFileMode>posix</tarLongFileMode>
- </configuration>
- <executions>
- <execution>
- <id>${assembly.id}</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
diff --git a/ms/controllerblueprints/distribution/pom.xml b/ms/controllerblueprints/distribution/pom.xml new file mode 100644 index 00000000..37c0b844 --- /dev/null +++ b/ms/controllerblueprints/distribution/pom.xml @@ -0,0 +1,187 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright © 2017-2018 AT&T Intellectual Property.
+ ~
+ ~ 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.
+ -->
+
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.3.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+ <artifactId>distribution</artifactId>
+ <packaging>pom</packaging>
+ <name>Controller Blueprints Distribution</name>
+ <properties>
+ <assembly.id>maven</assembly.id>
+ <name.space>org.onap.ccsdk.apps</name.space> <!-- <name.space>${namespace}</name.space> -->
+ <serviceArtifactName>controllerblueprints</serviceArtifactName>
+ <image.name>onap/ccsdk-controllerblueprints</image.name>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>application</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <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>
+ <resources>
+ <resource>
+ <directory>src/main/docker</directory>
+ <includes>
+ <include>*</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ant-test</id>
+ <phase>package</phase>
+ <configuration>
+ <tasks>
+ <fixcrlf srcdir="${basedir}" eol="unix"
+ includes="**/*.sh, **/*.source"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <!--build the final artifact for docker deployment -->
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.0.0</version>
+ <configuration>
+ <!-- <skipAssembly>${skip.assembly}</skipAssembly>-->
+ <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
+ <descriptors>
+ <descriptor>src/main/docker/distribution.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>posix</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>${assembly.id}</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ println project.properties['ccsdk.project.version'];
+ def versionArray;
+ if (project.properties['ccsdk.project.version'] != null ) {
+ versionArray = project.properties['ccsdk.project.version'].split('\\.');
+ }
+
+ if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT"))
+ {
+ project.properties['project.docker.latesttag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+ } else {
+ project.properties['project.docker.latesttag.version']=versionArray[0]+'.' + versionArray[1]+"-STAGING-latest";
+ }
+
+ println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.26.1</version>
+ <inherited>false</inherited>
+ <configuration>
+ <images>
+ <image>
+ <name>${image.name}</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ </tags>
+ </build>
+ </image>
+ </images>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <!--<execution>-->
+ <!--<id>build-images</id>-->
+ <!--<phase>package</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>
+ </plugins>
+ </build>
+</project>
+
diff --git a/ms/controllerblueprints/application/src/main/dc/docker-compose.yaml b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml index 5696d02b..9450f306 100644 --- a/ms/controllerblueprints/application/src/main/dc/docker-compose.yaml +++ b/ms/controllerblueprints/distribution/src/main/dc/docker-compose.yaml @@ -17,7 +17,7 @@ services: controller-blueprints:
depends_on:
- db
- image: onap/controllerblueprints:1.0.0
+ image: onap/ccsdk-controllerblueprints:latest
container_name: cb-rest
ports:
- "8080:8080"
diff --git a/ms/controllerblueprints/application/src/main/docker/Dockerfile b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile index 06304e1d..a2f453f2 100644 --- a/ms/controllerblueprints/application/src/main/docker/Dockerfile +++ b/ms/controllerblueprints/distribution/src/main/docker/Dockerfile @@ -1,5 +1,8 @@ FROM anapsix/alpine-java:8_jdk +ENV HTTP_PROXY ${HTTP_PROXY} +ENV HTTPS_PROXY ${HTTPS_PROXY} + RUN apk add --no-cache curl COPY startService.sh /startService.sh diff --git a/ms/controllerblueprints/application/src/assembly/distribution.xml b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml index c58c20d7..f2f3cb0b 100644 --- a/ms/controllerblueprints/application/src/assembly/distribution.xml +++ b/ms/controllerblueprints/distribution/src/main/docker/distribution.xml @@ -32,11 +32,11 @@ </dependencySets> <fileSets> <fileSet> - <directory>${project.basedir}/src/main/resources</directory> + <directory>${project.basedir}/../application/src/main/resources</directory> <includes> <include>application.properties</include> </includes> - <outputDirectory>/</outputDirectory> + <outputDirectory>./</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet> <fileSet> @@ -45,26 +45,26 @@ <include>Dockerfile</include> <include>startService.sh</include> </includes> - <outputDirectory>/</outputDirectory> + <outputDirectory>./</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet> <fileSet> - <directory>${project.basedir}/src/main/groovy</directory> + <directory>${project.basedir}/../application/src/main/groovy</directory> <outputDirectory>src/main/groovy</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet> <fileSet> - <directory>${project.basedir}/src/main/resources</directory> + <directory>${project.basedir}/../application/src/main/resources</directory> <outputDirectory>src/main/resources</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet> <fileSet> - <directory>${project.basedir}/etc</directory> - <outputDirectory>/etc</outputDirectory> + <directory>${project.basedir}/../application/etc</directory> + <outputDirectory>./etc</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet> <fileSet> - <directory>${project.basedir}/load</directory> + <directory>${project.basedir}/../application/load</directory> <outputDirectory>load</outputDirectory> <useDefaultExcludes>true</useDefaultExcludes> </fileSet> diff --git a/ms/controllerblueprints/application/src/main/docker/startService.sh b/ms/controllerblueprints/distribution/src/main/docker/startService.sh index 7077c224..7077c224 100644 --- a/ms/controllerblueprints/application/src/main/docker/startService.sh +++ b/ms/controllerblueprints/distribution/src/main/docker/startService.sh diff --git a/ms/controllerblueprints/modules/core/pom.xml b/ms/controllerblueprints/modules/core/pom.xml index fc7581c8..5782c60f 100644 --- a/ms/controllerblueprints/modules/core/pom.xml +++ b/ms/controllerblueprints/modules/core/pom.xml @@ -21,11 +21,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-modules</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>modules</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>
- <artifactId>controllerblueprints-core</artifactId>
+ <artifactId>core</artifactId>
<name>Controller Blueprints Core</name>
<dependencies>
diff --git a/ms/controllerblueprints/modules/pom.xml b/ms/controllerblueprints/modules/pom.xml index 9e7215ba..5ab4e447 100644 --- a/ms/controllerblueprints/modules/pom.xml +++ b/ms/controllerblueprints/modules/pom.xml @@ -21,12 +21,12 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-parent</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>parent</artifactId>
<version>0.3.0-SNAPSHOT</version>
<relativePath>../parent</relativePath>
</parent>
- <artifactId>controllerblueprints-modules</artifactId>
+ <artifactId>modules</artifactId>
<name>Controller Blueprints Modules</name>
<packaging>pom</packaging>
diff --git a/ms/controllerblueprints/modules/resource-dict/pom.xml b/ms/controllerblueprints/modules/resource-dict/pom.xml index 337f5512..4f226185 100644 --- a/ms/controllerblueprints/modules/resource-dict/pom.xml +++ b/ms/controllerblueprints/modules/resource-dict/pom.xml @@ -21,17 +21,17 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-modules</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>modules</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>
- <artifactId>controllerblueprints-resource-dict</artifactId>
+ <artifactId>resource-dict</artifactId>
<name>Controller Blueprints Resource Dictionary</name>
<dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-core</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>core</artifactId>
</dependency>
</dependencies>
diff --git a/ms/controllerblueprints/modules/service/pom.xml b/ms/controllerblueprints/modules/service/pom.xml index b4b798e6..6a40a4a7 100644 --- a/ms/controllerblueprints/modules/service/pom.xml +++ b/ms/controllerblueprints/modules/service/pom.xml @@ -21,11 +21,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-modules</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>modules</artifactId>
<version>0.3.0-SNAPSHOT</version>
</parent>
- <artifactId>controllerblueprints-service</artifactId>
+ <artifactId>service</artifactId>
<name>Controller Blueprints Service</name>
<properties>
@@ -33,8 +33,8 @@ <dependencies>
<dependency>
- <groupId>org.onap.ccsdk.apps</groupId>
- <artifactId>controllerblueprints-resource-dict</artifactId>
+ <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId>
+ <artifactId>resource-dict</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
diff --git a/ms/controllerblueprints/parent/pom.xml b/ms/controllerblueprints/parent/pom.xml index f8977d1f..e48c1134 100644 --- a/ms/controllerblueprints/parent/pom.xml +++ b/ms/controllerblueprints/parent/pom.xml @@ -20,18 +20,18 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <modelVersion>4.0.0</modelVersion> - <groupId>org.onap.ccsdk.apps</groupId> - <artifactId>controllerblueprints-parent</artifactId> + <parent> + <groupId>org.onap.ccsdk.apps</groupId> + <artifactId>controllerblueprints</artifactId> + <version>0.3.0-SNAPSHOT</version> + </parent> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>parent</artifactId> <name>Controller Blueprints Parent</name> - <version>0.3.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <maven.compiler.target>1.8</maven.compiler.target> - <maven.compiler.source>1.8</maven.compiler.source> - <java.version>1.8</java.version> <spring.boot.version>2.0.4.RELEASE</spring.boot.version> + <spring.version>5.0.8.RELEASE</spring.version> <kotlin.version>1.2.60</kotlin.version> <eelf.version>1.0.0</eelf.version> <springfox.swagger2.version>2.9.2</springfox.swagger2.version> @@ -122,19 +122,26 @@ <version>${kotlin.version}</version> <scope>test</scope> </dependency> + + <!-- Application Components --> <dependency> - <groupId>org.onap.ccsdk.apps</groupId> - <artifactId>controllerblueprints-core</artifactId> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>core</artifactId> <version>${project.version}</version> </dependency> <dependency> - <groupId>org.onap.ccsdk.apps</groupId> - <artifactId>controllerblueprints-service</artifactId> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>service</artifactId> <version>${project.version}</version> </dependency> <dependency> - <groupId>org.onap.ccsdk.apps</groupId> - <artifactId>controllerblueprints-resource-dict</artifactId> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>application</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.apps.controllerblueprints</groupId> + <artifactId>resource-dict</artifactId> <version>${project.version}</version> </dependency> </dependencies> @@ -148,17 +155,14 @@ <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.2.1</version> - </dependency> + </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> - <version>3.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.6</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> diff --git a/ms/controllerblueprints/pom.xml b/ms/controllerblueprints/pom.xml index d76f4c8c..798bdae4 100644 --- a/ms/controllerblueprints/pom.xml +++ b/ms/controllerblueprints/pom.xml @@ -30,12 +30,20 @@ <properties> <service.name>ControllerBlueprints</service.name> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> + <build.number>${maven.build.timestamp}</build.number> + <java.version>1.8</java.version> + <maven.compiler.target>1.8</maven.compiler.target> + <maven.compiler.source>1.8</maven.compiler.source> + <ccsdk.project.version>${project.version}</ccsdk.project.version> </properties> <packaging>pom</packaging> <modules> <module>parent</module> <module>modules</module> <module>application</module> + <module>distribution</module> </modules> </project> |