From 74e4e8dede50ffaf0d2209046959dea98b903c33 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Tue, 22 Aug 2017 11:51:54 -0400 Subject: Use docker profile Docker plugin should be defined in separate profile so that it is only triggered by docker Jenkins jobs, which enable the docker profile via -P docker command line arg. Change-Id: I42826bf5fe1c4cfcf6dd0122b3d889ddd031306a Issue-ID: CCSDK-64 Signed-off-by: Dan Timoney --- opendaylight/pom.xml | 153 +++++++++++++++++++++++++++------------------------ 1 file changed, 82 insertions(+), 71 deletions(-) (limited to 'opendaylight') diff --git a/opendaylight/pom.xml b/opendaylight/pom.xml index 9de65fd0..5924cba0 100644 --- a/opendaylight/pom.xml +++ b/opendaylight/pom.xml @@ -58,99 +58,57 @@ 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'] != null ) { + versionArray = project.properties['ccsdk.project.version'].split('\\.'); } - if (project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT")) { + 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"; + project.properties['project.docker.latesttag.version']=versionArray[0]+ '.' + versionArray[1] +"-STAGING-latest"; } - println 'New Tag for docker:' + - project.properties['project.docker.latesttag.version']; + println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']; + + - io.fabric8 - docker-maven-plugin - 0.16.5 - false - - - - ${image.name} - - try - ${basedir}/target/docker-stage - ${basedir}/target/docker-stage/Dockerfile - - ${project.version} - ${project.version}-STAGING-${maven.build.timestamp} - ${project.docker.latesttag.version} - - - - - + org.apache.maven.plugins + maven-dependency-plugin + 3.0.0 - generate-images - package + get-odl-distribution + validate - build + copy - + + + + org.opendaylight.integration + distribution-karaf + ${ccsdk.opendaylight.version} + tar.gz - - push-images - deploy - - build - push - + true + ${basedir}/target/docker-stage + + + false + true + true + - - - org.apache.maven.plugins - maven-dependency-plugin - 3.0.0 - - - get-odl-distribution - validate - - copy - - - - - org.opendaylight.integration - distribution-karaf - ${ccsdk.opendaylight.version} - tar.gz - - true - ${basedir}/target/docker-stage - - - false - true - true - - - - - org.apache.maven.plugins maven-dependency-plugin @@ -213,6 +171,59 @@ + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.16.5 + false + + + + ${image.name} + + try + ${basedir}/target/docker-stage + ${basedir}/target/docker-stage/Dockerfile + + ${project.version} + ${project.version}-STAGING-${maven.build.timestamp} + ${project.docker.latesttag.version} + + + + + + + + generate-images + package + + build + + + + + push-images + deploy + + build + push + + + + + + + + + + openECOMP -- cgit 1.2.3-korg