diff options
-rw-r--r-- | alpine/pom.xml | 27 | ||||
-rw-r--r-- | ansible-server/pom.xml | 304 | ||||
-rw-r--r-- | dgbuilder-docker/pom.xml | 209 | ||||
-rw-r--r-- | dgbuilder-docker/src/main/docker/Dockerfile | 2 | ||||
-rw-r--r-- | odlsli/odlsli-alpine/pom.xml | 24 | ||||
-rw-r--r-- | odlsli/odlsli-alpine/src/main/docker/Dockerfile | 2 | ||||
-rw-r--r-- | odlsli/odlsli-ubuntu/pom.xml | 24 | ||||
-rw-r--r-- | odlsli/odlsli-ubuntu/src/main/docker/Dockerfile | 2 | ||||
-rw-r--r-- | opendaylight/fluorine/fluorine-alpine/pom.xml | 426 | ||||
-rw-r--r-- | opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile | 2 | ||||
-rw-r--r-- | opendaylight/fluorine/fluorine-ubuntu/pom.xml | 426 | ||||
-rw-r--r-- | opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile | 2 | ||||
-rw-r--r-- | saltstack-server/pom.xml | 25 | ||||
-rw-r--r-- | src/main/scripts/TagVersion.groovy | 41 | ||||
-rw-r--r-- | ubuntu/pom.xml | 26 |
15 files changed, 731 insertions, 811 deletions
diff --git a/alpine/pom.xml b/alpine/pom.xml index 8e3a1642..3aebe954 100644 --- a/alpine/pom.xml +++ b/alpine/pom.xml @@ -21,6 +21,7 @@ <properties> <image.name>onap/ccsdk-alpine-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> </properties> <build> @@ -35,24 +36,8 @@ <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> + <source>${basedir}/../src/main/scripts/TagVersion.groovy</source> </configuration> </execution> </executions> @@ -106,9 +91,9 @@ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> <dockerFile>Dockerfile</dockerFile> <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> </tags> </build> </image> diff --git a/ansible-server/pom.xml b/ansible-server/pom.xml index a8092026..662864cb 100644 --- a/ansible-server/pom.xml +++ b/ansible-server/pom.xml @@ -1,170 +1,158 @@ <?xml version="1.0" encoding="UTF-8"?> -<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/maven-v4_0_0.xsd"> +<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/maven-v4_0_0.xsd"> - <parent> - <groupId>org.onap.ccsdk.parent</groupId> - <artifactId>odlparent-lite</artifactId> - <version>1.2.1-SNAPSHOT</version> - </parent> + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>odlparent-lite</artifactId> + <version>1.2.1-SNAPSHOT</version> + </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>pom</packaging> - <groupId>org.onap.ccsdk.distribution</groupId> - <artifactId>ansible-server</artifactId> - <version>0.4.1-SNAPSHOT</version> + <modelVersion>4.0.0</modelVersion> + <packaging>pom</packaging> + <groupId>org.onap.ccsdk.distribution</groupId> + <artifactId>ansible-server</artifactId> + <version>0.4.1-SNAPSHOT</version> - <name>ccsdk :: distribution :: ${project.artifactId}</name> - <description>Creates ansible-server Docker container</description> + <name>ccsdk :: distribution :: ${project.artifactId}</name> + <description>Creates ansible-server Docker container</description> - <properties> - <image.name>onap/ccsdk-ansible-server-image</image.name> - <ccsdk.project.version>${project.version}</ccsdk.project.version> - <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version> - <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> - <docker.verbose>true</docker.verbose> - </properties> + <properties> + <image.name>onap/ccsdk-ansible-server-image</image.name> + <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> + <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version> + <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> + <docker.verbose>true</docker.verbose> + </properties> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.groovy.maven</groupId> - <artifactId>gmaven-plugin</artifactId> - <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('\\.'); - } + <build> + <plugins> + <plugin> + <groupId>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source>${basedir}/../src/main/scripts/TagVersion.groovy</source> + </configuration> + </execution> + </executions> + </plugin> - 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"; - } + <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</directory> + <includes> + <include>**/*</include> + </includes> + <filtering>false</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> - println 'New Tag for docker:' + project.properties['project.docker.latesttag.version']; - </source> - </configuration> - </execution> - </executions> - </plugin> + <plugin> + <artifactId>exec-maven-plugin</artifactId> + <groupId>org.codehaus.mojo</groupId> + <version>1.5.0</version> + <executions> + <execution> + <id>change python permissions</id> + <phase>process-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>/usr/bin/find</executable> + <arguments> + <argument>${basedir}/target/docker-stage/ansible-server</argument> + <argument>-name</argument> + <argument>*.py</argument> + <argument>-exec</argument> + <argument>chmod</argument> + <argument>+x</argument> + <argument>{}</argument> + <argument>;</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> - <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</directory> - <includes> - <include>**/*</include> - </includes> - <filtering>false</filtering> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.16.5</version> + <inherited>false</inherited> + <configuration> + <images> + <image> + <name>${image.name}</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> + <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> + <tags> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> + </tags> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> - <plugin> - <artifactId>exec-maven-plugin</artifactId> - <groupId>org.codehaus.mojo</groupId> - <version>1.5.0</version> - <executions> - <execution> - <id>change python permissions</id> - <phase>process-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>/usr/bin/find</executable> - <arguments> - <argument>${basedir}/target/docker-stage/ansible-server</argument> - <argument>-name</argument> - <argument>*.py</argument> - <argument>-exec</argument> - <argument>chmod</argument> - <argument>+x</argument> - <argument>{}</argument> - <argument>;</argument> - </arguments> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>docker</id> - <build> - <plugins> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.16.5</version> - <inherited>false</inherited> - <configuration> - <images> - <image> - <name>${image.name}</name> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> - <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> - <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> - </tags> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>generate-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> - </profile> - </profiles> - <organization> - <name>ONAP</name> - </organization> + <execution> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + <organization> + <name>ONAP</name> + </organization> </project> diff --git a/dgbuilder-docker/pom.xml b/dgbuilder-docker/pom.xml index 998bc3b5..2c160fc5 100644 --- a/dgbuilder-docker/pom.xml +++ b/dgbuilder-docker/pom.xml @@ -1,5 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> -<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"> +<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"> <modelVersion>4.0.0</modelVersion> <parent> @@ -22,43 +24,28 @@ <properties> <image.name>onap/ccsdk-dgbuilder-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> </properties> <build> <plugins> - <plugin> - <groupId>org.codehaus.groovy.maven</groupId> - <artifactId>gmaven-plugin</artifactId> - <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>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source>${basedir}/../src/main/scripts/TagVersion.groovy</source> + </configuration> + </execution> + </executions> + </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> @@ -90,35 +77,35 @@ <artifactId>exec-maven-plugin</artifactId> <version>1.5.0</version> <executions> - <execution> - <id>Make-stage-dir</id> - <phase>generate-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>/bin/mkdir</executable> - <arguments> - <argument>-p</argument> - <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument> - </arguments> - </configuration> - </execution> - <execution> - <id>Unzip dgbuilder</id> - <phase>generate-sources</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <executable>/usr/bin/unzip</executable> - <arguments> - <argument>-d</argument> - <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument> - <argument>../dgbuilder/target/*.zip</argument> - </arguments> - </configuration> - </execution> + <execution> + <id>Make-stage-dir</id> + <phase>generate-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>/bin/mkdir</executable> + <arguments> + <argument>-p</argument> + <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument> + </arguments> + </configuration> + </execution> + <execution> + <id>Unzip dgbuilder</id> + <phase>generate-sources</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>/usr/bin/unzip</executable> + <arguments> + <argument>-d</argument> + <argument>${basedir}/target/docker-stage/opt/onap/ccsdk</argument> + <argument>../dgbuilder/target/*.zip</argument> + </arguments> + </configuration> + </execution> <execution> <id>Copy dgbuilder</id> <phase>generate-sources</phase> @@ -154,7 +141,7 @@ <execution> <id>change shell permissions</id> - <phase>process-sources</phase> + <phase>process-sources</phase> <goals> <goal>exec</goal> </goals> @@ -175,57 +162,57 @@ </executions> </plugin> </plugins> - </build> + </build> <profiles> - <profile> - <id>docker</id> - <build> - <plugins> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.16.5</version> - <inherited>false</inherited> - <configuration> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.16.5</version> + <inherited>false</inherited> + <configuration> - <images> - <image> - <name>${image.name}</name> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> - <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> - <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> - </tags> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>generate-images</id> - <phase>package</phase> - <goals> - <goal>build</goal> - </goals> - </execution> + <images> + <image> + <name>${image.name}</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> + <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> + <tags> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> + </tags> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-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> - </profile> - </profiles> + <execution> + <id>push-images</id> + <phase>deploy</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> diff --git a/dgbuilder-docker/src/main/docker/Dockerfile b/dgbuilder-docker/src/main/docker/Dockerfile index 675e37a6..90ade01f 100644 --- a/dgbuilder-docker/src/main/docker/Dockerfile +++ b/dgbuilder-docker/src/main/docker/Dockerfile @@ -1,5 +1,5 @@ # Base ubuntu with added packages needed for open ecomp -FROM onap/ccsdk-ubuntu-image:${project.version} +FROM onap/ccsdk-ubuntu-image:${project.docker.latestfulltag.version} MAINTAINER CCSDK Team (onap-discuss@lists.onap.org) # copy onap diff --git a/odlsli/odlsli-alpine/pom.xml b/odlsli/odlsli-alpine/pom.xml index 89207a96..58f71a9d 100644 --- a/odlsli/odlsli-alpine/pom.xml +++ b/odlsli/odlsli-alpine/pom.xml @@ -24,6 +24,7 @@ <base.image.name>onap/ccsdk-odl-fluorine-alpine-image</base.image.name> <image.name>onap/ccsdk-odlsli-alpine-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> <ccsdk.features.version>${project.version}</ccsdk.features.version> <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> @@ -258,22 +259,7 @@ <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> + <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source> </configuration> </execution> </executions> @@ -513,9 +499,9 @@ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> </tags> </build> </image> diff --git a/odlsli/odlsli-alpine/src/main/docker/Dockerfile b/odlsli/odlsli-alpine/src/main/docker/Dockerfile index 47b12081..b9054670 100644 --- a/odlsli/odlsli-alpine/src/main/docker/Dockerfile +++ b/odlsli/odlsli-alpine/src/main/docker/Dockerfile @@ -1,5 +1,5 @@ # Base ubuntu with added packages needed for open ecomp -FROM ${base.image.name}:${project.version} +FROM ${base.image.name}:${project.docker.latestfulltag.version} MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV ODL_HOME /opt/opendaylight diff --git a/odlsli/odlsli-ubuntu/pom.xml b/odlsli/odlsli-ubuntu/pom.xml index 488692c9..8b26b490 100644 --- a/odlsli/odlsli-ubuntu/pom.xml +++ b/odlsli/odlsli-ubuntu/pom.xml @@ -24,6 +24,7 @@ <base.image.name>onap/ccsdk-odl-fluorine-ubuntu-image</base.image.name> <image.name>onap/ccsdk-odlsli-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> <ccsdk.features.version>${project.version}</ccsdk.features.version> <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> @@ -258,22 +259,7 @@ <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> + <source>${basedir}/../../src/main/scripts/TagVersion.groovy</source> </configuration> </execution> </executions> @@ -513,9 +499,9 @@ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> </tags> </build> </image> diff --git a/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile b/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile index 98f17e4b..d5460e4b 100644 --- a/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile +++ b/odlsli/odlsli-ubuntu/src/main/docker/Dockerfile @@ -1,5 +1,5 @@ # Base ubuntu with added packages needed for open ecomp -FROM ${base.image.name}:${project.version} +FROM ${base.image.name}:${project.docker.latestfulltag.version} MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 ENV ODL_HOME /opt/opendaylight diff --git a/opendaylight/fluorine/fluorine-alpine/pom.xml b/opendaylight/fluorine/fluorine-alpine/pom.xml index 477effa6..2d3083d6 100644 --- a/opendaylight/fluorine/fluorine-alpine/pom.xml +++ b/opendaylight/fluorine/fluorine-alpine/pom.xml @@ -1,221 +1,209 @@ <?xml version="1.0" encoding="UTF-8"?> -<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"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.distribution</groupId> - <artifactId>distribution-odl-fluorine</artifactId> - <version>0.4.1-SNAPSHOT</version> - </parent> - - <artifactId>distribution-odl-fluorine-alpine</artifactId> - <version>0.4.1-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name> - <description>Creates OpenDaylight container</description> - <organization> - <name>ONAP</name> - </organization> - - <properties> - <image.name>onap/ccsdk-odl-fluorine-alpine-image</image.name> - <ccsdk.project.version>${project.version}</ccsdk.project.version> - <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version> - <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version> - <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> - <docker.push.phase>deploy</docker.push.phase> - </properties> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.integration</groupId> - <artifactId>karaf</artifactId> - <version>${ccsdk.opendaylight.version}</version> - <type>tar.gz</type> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - <version>${ccsdk.mariadb-connector-java.version}</version> - <type>jar</type> - </dependency> - </dependencies> - </dependencyManagement> - - <build> - <plugins> - - - <plugin> - <groupId>org.codehaus.groovy.maven</groupId> - <artifactId>gmaven-plugin</artifactId> - <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>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>get-odl-distribution</id> - <phase>validate</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.opendaylight.integration</groupId> - <artifactId>karaf</artifactId> - <version>${ccsdk.opendaylight.version}</version> - <type>tar.gz</type> - - <overWrite>true</overWrite> - <outputDirectory>${basedir}/target/docker-stage</outputDirectory> - </artifactItem> - </artifactItems> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - </configuration> - </execution> - - <execution> - <id>get-mariadb-connector-jar</id> - <phase>validate</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - <version>${ccsdk.mariadb-connector-java.version}</version> - <type>jar</type> - <overWrite>true</overWrite> - <outputDirectory>${basedir}/target/docker-stage</outputDirectory> - </artifactItem> - </artifactItems> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - </configuration> - </execution> - </executions> - </plugin> - - <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>Dockerfile</include> - </includes> - <filtering>true</filtering> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - - - - </plugins> - </build> - - <profiles> - <profile> - <id>docker</id> - <build> - <plugins> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.16.5</version> - <inherited>false</inherited> - <configuration> - <images> - <image> - <name>${image.name}</name> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> - <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> - <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> - </tags> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>generate-images</id> - <phase>package</phase> - <goals> - <goal>build</goal> - </goals> - </execution> - - <execution> - <id>push-images</id> - <phase>${docker.push.phase}</phase> - <goals> - <goal>build</goal> - <goal>push</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - </profile> - - </profiles> +<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"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.distribution</groupId> + <artifactId>distribution-odl-fluorine</artifactId> + <version>0.4.1-SNAPSHOT</version> + </parent> + + <artifactId>distribution-odl-fluorine-alpine</artifactId> + <version>0.4.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name> + <description>Creates OpenDaylight container</description> + <organization> + <name>ONAP</name> + </organization> + + <properties> + <image.name>onap/ccsdk-odl-fluorine-alpine-image</image.name> + <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> + <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version> + <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version> + <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> + <docker.push.phase>deploy</docker.push.phase> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.opendaylight.integration</groupId> + <artifactId>karaf</artifactId> + <version>${ccsdk.opendaylight.version}</version> + <type>tar.gz</type> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${ccsdk.mariadb-connector-java.version}</version> + <type>jar</type> + </dependency> + </dependencies> + </dependencyManagement> + + <build> + <plugins> + + + <plugin> + <groupId>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source> + </configuration> + </execution> + </executions> + </plugin> + + + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>get-odl-distribution</id> + <phase>validate</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.opendaylight.integration</groupId> + <artifactId>karaf</artifactId> + <version>${ccsdk.opendaylight.version}</version> + <type>tar.gz</type> + + <overWrite>true</overWrite> + <outputDirectory>${basedir}/target/docker-stage</outputDirectory> + </artifactItem> + </artifactItems> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + </configuration> + </execution> + + <execution> + <id>get-mariadb-connector-jar</id> + <phase>validate</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${ccsdk.mariadb-connector-java.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${basedir}/target/docker-stage</outputDirectory> + </artifactItem> + </artifactItems> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + </configuration> + </execution> + </executions> + </plugin> + + <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>Dockerfile</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + + + + </plugins> + </build> + + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.16.5</version> + <inherited>false</inherited> + <configuration> + <images> + <image> + <name>${image.name}</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> + <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> + <tags> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> + </tags> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + + <execution> + <id>push-images</id> + <phase>${docker.push.phase}</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> + </profile> + + </profiles> </project> diff --git a/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile b/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile index dc7736dd..a043e1e9 100644 --- a/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile +++ b/opendaylight/fluorine/fluorine-alpine/src/main/docker/Dockerfile @@ -1,5 +1,5 @@ # Base ubuntu with added packages needed for open ecomp -FROM onap/ccsdk-alpine-image:${project.version} +FROM onap/ccsdk-alpine-image:${project.docker.latestfulltag.version} MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk ENV ODL_HOME /opt/opendaylight/current diff --git a/opendaylight/fluorine/fluorine-ubuntu/pom.xml b/opendaylight/fluorine/fluorine-ubuntu/pom.xml index d1849571..c48a4150 100644 --- a/opendaylight/fluorine/fluorine-ubuntu/pom.xml +++ b/opendaylight/fluorine/fluorine-ubuntu/pom.xml @@ -1,221 +1,209 @@ <?xml version="1.0" encoding="UTF-8"?> -<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"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.onap.ccsdk.distribution</groupId> - <artifactId>distribution-odl-fluorine</artifactId> - <version>0.4.1-SNAPSHOT</version> - </parent> - - <artifactId>distribution-odl-fluorine-ubuntu</artifactId> - <version>0.4.1-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name> - <description>Creates OpenDaylight container</description> - <organization> - <name>ONAP</name> - </organization> - - <properties> - <image.name>onap/ccsdk-odl-fluorine-ubuntu-image</image.name> - <ccsdk.project.version>${project.version}</ccsdk.project.version> - <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version> - <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version> - <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> - <docker.push.phase>deploy</docker.push.phase> - </properties> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.opendaylight.integration</groupId> - <artifactId>karaf</artifactId> - <version>${ccsdk.opendaylight.version}</version> - <type>tar.gz</type> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - <version>${ccsdk.mariadb-connector-java.version}</version> - <type>jar</type> - </dependency> - </dependencies> - </dependencyManagement> - - <build> - <plugins> - - - <plugin> - <groupId>org.codehaus.groovy.maven</groupId> - <artifactId>gmaven-plugin</artifactId> - <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>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>get-odl-distribution</id> - <phase>validate</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.opendaylight.integration</groupId> - <artifactId>karaf</artifactId> - <version>${ccsdk.opendaylight.version}</version> - <type>tar.gz</type> - - <overWrite>true</overWrite> - <outputDirectory>${basedir}/target/docker-stage</outputDirectory> - </artifactItem> - </artifactItems> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - </configuration> - </execution> - - <execution> - <id>get-mariadb-connector-jar</id> - <phase>validate</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - <version>${ccsdk.mariadb-connector-java.version}</version> - <type>jar</type> - <overWrite>true</overWrite> - <outputDirectory>${basedir}/target/docker-stage</outputDirectory> - </artifactItem> - </artifactItems> - <overWriteReleases>false</overWriteReleases> - <overWriteSnapshots>true</overWriteSnapshots> - <overWriteIfNewer>true</overWriteIfNewer> - </configuration> - </execution> - </executions> - </plugin> - - <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>Dockerfile</include> - </includes> - <filtering>true</filtering> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - - - - </plugins> - </build> - - <profiles> - <profile> - <id>docker</id> - <build> - <plugins> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>0.16.5</version> - <inherited>false</inherited> - <configuration> - <images> - <image> - <name>${image.name}</name> - <build> - <cleanup>try</cleanup> - <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> - <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> - <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> - </tags> - </build> - </image> - </images> - </configuration> - <executions> - <execution> - <id>generate-images</id> - <phase>package</phase> - <goals> - <goal>build</goal> - </goals> - </execution> - - <execution> - <id>push-images</id> - <phase>${docker.push.phase}</phase> - <goals> - <goal>build</goal> - <goal>push</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - </profile> - - </profiles> +<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"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.distribution</groupId> + <artifactId>distribution-odl-fluorine</artifactId> + <version>0.4.1-SNAPSHOT</version> + </parent> + + <artifactId>distribution-odl-fluorine-ubuntu</artifactId> + <version>0.4.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>ccsdk-distribution :: opendaylight :: ${project.artifactId}</name> + <description>Creates OpenDaylight container</description> + <organization> + <name>ONAP</name> + </organization> + + <properties> + <image.name>onap/ccsdk-odl-fluorine-ubuntu-image</image.name> + <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> + <ccsdk.opendaylight.version>0.9.1</ccsdk.opendaylight.version> + <ccsdk.mariadb-connector-java.version>2.1.1</ccsdk.mariadb-connector-java.version> + <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy> + <docker.push.phase>deploy</docker.push.phase> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.opendaylight.integration</groupId> + <artifactId>karaf</artifactId> + <version>${ccsdk.opendaylight.version}</version> + <type>tar.gz</type> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${ccsdk.mariadb-connector-java.version}</version> + <type>jar</type> + </dependency> + </dependencies> + </dependencyManagement> + + <build> + <plugins> + + + <plugin> + <groupId>org.codehaus.groovy.maven</groupId> + <artifactId>gmaven-plugin</artifactId> + <executions> + <execution> + <phase>validate</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source>${basedir}/../../../src/main/scripts/TagVersion.groovy</source> + </configuration> + </execution> + </executions> + </plugin> + + + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>get-odl-distribution</id> + <phase>validate</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.opendaylight.integration</groupId> + <artifactId>karaf</artifactId> + <version>${ccsdk.opendaylight.version}</version> + <type>tar.gz</type> + + <overWrite>true</overWrite> + <outputDirectory>${basedir}/target/docker-stage</outputDirectory> + </artifactItem> + </artifactItems> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + </configuration> + </execution> + + <execution> + <id>get-mariadb-connector-jar</id> + <phase>validate</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>${ccsdk.mariadb-connector-java.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${basedir}/target/docker-stage</outputDirectory> + </artifactItem> + </artifactItems> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>true</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + </configuration> + </execution> + </executions> + </plugin> + + <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>Dockerfile</include> + </includes> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + + + + </plugins> + </build> + + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>0.16.5</version> + <inherited>false</inherited> + <configuration> + <images> + <image> + <name>${image.name}</name> + <build> + <cleanup>try</cleanup> + <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> + <dockerFile>${basedir}/target/docker-stage/Dockerfile</dockerFile> + <tags> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> + </tags> + </build> + </image> + </images> + </configuration> + <executions> + <execution> + <id>generate-images</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + </execution> + + <execution> + <id>push-images</id> + <phase>${docker.push.phase}</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> + </profile> + + </profiles> </project> diff --git a/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile b/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile index 93811de9..9c9fec0f 100644 --- a/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile +++ b/opendaylight/fluorine/fluorine-ubuntu/src/main/docker/Dockerfile @@ -1,5 +1,5 @@ # Base ubuntu with added packages needed for open ecomp -FROM onap/ccsdk-ubuntu-image:${project.version} +FROM onap/ccsdk-ubuntu-image:${project.docker.latestfulltag.version} MAINTAINER CCSDK Team (onap-ccsdk@lists.onap.org) ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 ENV ODL_HOME /opt/opendaylight/current diff --git a/saltstack-server/pom.xml b/saltstack-server/pom.xml index 019fcef7..b6d27010 100644 --- a/saltstack-server/pom.xml +++ b/saltstack-server/pom.xml @@ -18,6 +18,7 @@ <properties> <image.name>onap/ccsdk-saltstack-server-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> </properties> <build> @@ -33,23 +34,7 @@ <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> + <source>${basedir}/../src/main/scripts/TagVersion.groovy</source> </configuration> </execution> </executions> @@ -103,9 +88,9 @@ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> <dockerFile>Dockerfile</dockerFile> <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> </tags> </build> </image> diff --git a/src/main/scripts/TagVersion.groovy b/src/main/scripts/TagVersion.groovy new file mode 100644 index 00000000..68a8b780 --- /dev/null +++ b/src/main/scripts/TagVersion.groovy @@ -0,0 +1,41 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP CCSDK + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights + * reserved. + * ================================================================================ + * 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. + * ============LICENSE_END============================================ + * =================================================================== + * + */ + +package org.onap.ccsdk.distribution + + +def versionArray; +if ( project.properties['ccsdk.project.version'] != null ) { + versionArray = project.properties['ccsdk.project.version'].split('\\.'); +} + +if ( project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT") ) { + patchArray = versionArray[2].split('-'); + project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest"; + project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-latest"; + project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-"+project.properties['ccsdk.build.timestamp']; +} else { + project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest"; + project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-latest"; + project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-"+project.properties['ccsdk.build.timestamp']; +} diff --git a/ubuntu/pom.xml b/ubuntu/pom.xml index 8f17a987..c4f53b2f 100644 --- a/ubuntu/pom.xml +++ b/ubuntu/pom.xml @@ -21,6 +21,8 @@ <properties> <image.name>onap/ccsdk-ubuntu-image</image.name> <ccsdk.project.version>${project.version}</ccsdk.project.version> + <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp> + <ccsdk.distribution.version>${project.version}</ccsdk.distribution.version> </properties> <build> @@ -36,23 +38,7 @@ <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> + <source>${basedir}/../src/main/scripts/TagVersion.groovy</source> </configuration> </execution> </executions> @@ -106,9 +92,9 @@ <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir> <dockerFile>Dockerfile</dockerFile> <tags> - <tag>${project.version}</tag> - <tag>${project.version}-STAGING-${maven.build.timestamp}</tag> - <tag>${project.docker.latesttag.version}</tag> + <tag>${project.docker.latestminortag.version}</tag> + <tag>${project.docker.latestfulltag.version}</tag> + <tag>${project.docker.latesttagtimestamp.version}</tag> </tags> </build> </image> |