aboutsummaryrefslogtreecommitdiffstats
path: root/pom.xml
diff options
context:
space:
mode:
authorReshmasree <reshmasree.chamarthi2@wipro.com>2019-03-21 18:54:53 +0530
committerReshmasree <reshmasree.chamarthi2@wipro.com>2019-03-27 20:22:53 +0530
commitab400d51a639a01f31a60ac9d1e127d4d4d28b24 (patch)
treefd7ee3eb66c976bba4e4027e993eeb95666b98e8 /pom.xml
parent3cd4023832810e8b65f85a9db807c8bafec38d82 (diff)
Add component spec and blueprint
- validated component spec and blueprints are added to the repo - pom file changed to build,tag and push the docker image - checkstyle version changed from 1.2.3-SNAPSHOT to 1.2.3 - entrypoint script added Change-Id: I0fcf8a17b0c5ce1990de506bf94d2d9ddf93d6fd Issue-ID: DCAEGEN2-1159 Signed-off-by: Reshmasree <reshmasree.chamarthi2@wipro.com>
Diffstat (limited to 'pom.xml')
-rw-r--r--pom.xml114
1 files changed, 106 insertions, 8 deletions
diff --git a/pom.xml b/pom.xml
index cbb2c72..05dd29b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -42,12 +42,32 @@
<properties>
+ <sdk.version>1.1.3</sdk.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
+ <docker.image.name>onap/org.onap.dcaegen2.services.son-handler</docker.image.name>
+ <!-- NEXUS RELATED SETTINGS -->
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
+ <snapshots.path>content/repositories/snapshots/</snapshots.path>
+ <releases.path>content/repositories/releases/</releases.path>
+ <site.path>content/sites/site/org/onap/dcaegen2/services/son-handler/${project.artifactId}/${project.version}</site.path>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
</properties>
<dependencies>
+ <!-- cbs client -->
+ <dependency>
+ <groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
+ <artifactId>cbs-client</artifactId>
+ <version>${sdk.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onap.dcaegen2.services.sdk.security.crypt</groupId>
+ <artifactId>crypt-password</artifactId>
+ <version>${sdk.version}</version>
+ </dependency>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
@@ -82,7 +102,6 @@
<artifactId>javax.json-api</artifactId>
<version>1.1.2</version>
</dependency>
-
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
@@ -212,7 +231,7 @@
<dependency>
<groupId>org.onap.oparent</groupId>
<artifactId>checkstyle</artifactId>
- <version>1.2.3-SNAPSHOT</version>
+ <version>1.2.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -245,13 +264,92 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.0.4.RELEASE</version>
<executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
+ <plugin>
+ <groupId>com.spotify</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <serverId>${onap.nexus.dockerregistry.daily}</serverId>
+
+ <imageName>${docker.image.name}</imageName>
+ <imageTags>
+ <tag>latest</tag>
+ </imageTags>
+ <baseImage>java:openjdk-8</baseImage>
+ <resources>
+ <resource>
+ <targetPath>/bin</targetPath>
+ <directory>${project.build.directory}</directory>
+ <include>${project.artifactId}-${project.version}.jar</include>
+ </resource>
+ <resource>
+ <targetPath>/bin</targetPath>
+ <directory>${project.basedir}</directory>
+ <include>entrypoint.sh</include>
+ </resource>
+ </resources>
+ <runs>
+ <!-- Maven is loosing file permissions during artifacts copy -->
+ <run>chmod +x /bin/entrypoint.sh</run>
+ <run>mv /bin/*.jar /bin/application.jar</run>
+ </runs>
+ <exposes>
+ <expose>8080</expose>
+ </exposes>
+ <entryPoint>/bin/entrypoint.sh</entryPoint>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build-image</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>tag-and-push-image-latest</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>tag</goal>
+ </goals>
+ <configuration>
+ <image>${docker.image.name}:latest</image>
+ <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName>
+ <pushImage>true</pushImage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>tag-and-push-image-with-version</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>tag</goal>
+ </goals>
+ <configuration>
+ <image>${docker.image.name}:latest</image>
+ <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName>
+ <pushImage>true</pushImage>
+ </configuration>
+ </execution>
+ <execution>
+ <id>tag-and-push-image-with-version-and-date</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>tag</goal>
+ </goals>
+ <configuration>
+ <image>${docker.image.name}:latest</image>
+ <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName>
+ <pushImage>true</pushImage>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>