From 74896075be266b6f974eb9e1042ca7c6b5ed70db Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 12 Sep 2018 15:31:10 -0400 Subject: Control docker build with profile Docker build should only be run if docker profile is enabled. Change-Id: I6942c3e59b769053fd47d04fe98f3e4b95ea33dd Issue-ID: CCSDK-558 Signed-off-by: Timoney, Dan (dt5972) --- ms/neng/pom.xml | 142 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 94 insertions(+), 48 deletions(-) (limited to 'ms/neng/pom.xml') diff --git a/ms/neng/pom.xml b/ms/neng/pom.xml index 8390350a..0c5832a8 100644 --- a/ms/neng/pom.xml +++ b/ms/neng/pom.xml @@ -54,6 +54,10 @@ ms-networkelementnamegen 0.3.0 0.2.4 + ${https_proxy} + deploy + true + ${project.version} @@ -109,6 +113,63 @@ + + docker + + + + com.spotify + docker-maven-plugin + 0.4.11 + + onap/ccsdk-apps-ms-neng:${project.version} + src/main/docker + docker-hub + https://${docker.registry} + + ${project.version} + ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} + + true + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + / + ${project.build.directory} + opt/etc/config/* + + + / + ${project.build.directory} + opt/etc/keystore/* + + + / + ${project.build.directory} + opt/etc/truststore/* + + + / + ${project.build.directory} + opt/aai/keystore/* + + + / + ${project.build.directory} + etc/* + + + + + + + + @@ -259,6 +320,37 @@ NetworkElementNameGen + + org.codehaus.groovy.maven + gmaven-plugin + 1.0 + + + validate + + execute + + + + 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']; + + + + + org.jacoco jacoco-maven-plugin @@ -433,54 +525,7 @@ --> - - com.spotify - docker-maven-plugin - 0.4.11 - - onap/ccsdk-apps-ms-neng:${project.version} - src/main/docker - docker-hub - https://${docker.registry} - - ${project.version} - latest - - true - - - / - ${project.build.directory} - ${project.build.finalName}.jar - - - / - ${project.build.directory} - opt/etc/config/* - - - / - ${project.build.directory} - opt/etc/keystore/* - - - / - ${project.build.directory} - opt/etc/truststore/* - - - / - ${project.build.directory} - opt/aai/keystore/* - - - / - ${project.build.directory} - etc/* - - - - + org.springframework.boot spring-boot-maven-plugin @@ -593,5 +638,6 @@ + -- cgit 1.2.3-korg