summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimoney, Dan (dt5972) <dtimoney@att.com>2019-02-12 14:35:10 -0500
committerTimoney, Dan (dt5972) <dtimoney@att.com>2019-02-12 15:57:27 -0500
commitb83fec4d4fcb3086f2886e3424ea2db232aecdfd (patch)
tree5d48f5c76a50e929a175862004fb9b5da9ca65c9
parentdad8225dc0e6fa95dca5e02f6abb892a0a979ffe (diff)
Fix docker tags
Updated docker tags to conform to ONAP standards Change-Id: I489f6c6ce9ecdad973e72f3887825ea3ede317ae Issue-ID: CCSDK-1059 Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
-rw-r--r--ansible-server/pom.xml24
-rw-r--r--ansible-server/src/main/docker/Dockerfile2
-rw-r--r--dgbuilder-docker/pom.xml209
-rw-r--r--dgbuilder-docker/src/main/docker/Dockerfile2
-rw-r--r--odlsli/pom.xml24
-rw-r--r--odlsli/src/main/docker/Dockerfile2
-rw-r--r--opendaylight/oxygen/pom.xml24
-rw-r--r--opendaylight/oxygen/src/main/docker/Dockerfile2
-rw-r--r--src/main/scripts/TagVersion.groovy41
-rw-r--r--ubuntu/pom.xml26
10 files changed, 164 insertions, 192 deletions
diff --git a/ansible-server/pom.xml b/ansible-server/pom.xml
index 875437c0..ba141cb1 100644
--- a/ansible-server/pom.xml
+++ b/ansible-server/pom.xml
@@ -19,6 +19,7 @@
<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>
<docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
<maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
@@ -37,22 +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>
@@ -193,9 +179,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/ansible-server/src/main/docker/Dockerfile b/ansible-server/src/main/docker/Dockerfile
index 68adaeb0..bebd8e00 100644
--- a/ansible-server/src/main/docker/Dockerfile
+++ b/ansible-server/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM onap/ccsdk-ubuntu-image:${ccsdk.distribution.version}
+FROM onap/ccsdk-ubuntu-image:${project.docker.latestfulltag.version}
LABEL maintainer="SDN-C Team (sdnc@lists.openecomp.org)"
diff --git a/dgbuilder-docker/pom.xml b/dgbuilder-docker/pom.xml
index 398f6544..582c638f 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/pom.xml b/odlsli/pom.xml
index 3e72e7b6..b6842b79 100644
--- a/odlsli/pom.xml
+++ b/odlsli/pom.xml
@@ -25,6 +25,7 @@
<properties>
<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>0.3.3</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>
@@ -242,22 +243,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>
@@ -497,9 +483,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/src/main/docker/Dockerfile b/odlsli/src/main/docker/Dockerfile
index 8ba16f01..d9673bcf 100644
--- a/odlsli/src/main/docker/Dockerfile
+++ b/odlsli/src/main/docker/Dockerfile
@@ -1,5 +1,5 @@
# Base ubuntu with added packages needed for open ecomp
-FROM onap/ccsdk-odl-oxygen-image:${project.version}
+FROM onap/ccsdk-odl-oxygen-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
diff --git a/opendaylight/oxygen/pom.xml b/opendaylight/oxygen/pom.xml
index 62ffa496..ed0bebca 100644
--- a/opendaylight/oxygen/pom.xml
+++ b/opendaylight/oxygen/pom.xml
@@ -21,6 +21,7 @@
<properties>
<image.name>onap/ccsdk-odl-oxygen-image</image.name>
<ccsdk.project.version>${project.version}</ccsdk.project.version>
+ <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
<ccsdk.opendaylight.version>0.8.3</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>
@@ -58,22 +59,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>
@@ -185,9 +171,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/opendaylight/oxygen/src/main/docker/Dockerfile b/opendaylight/oxygen/src/main/docker/Dockerfile
index 93811de9..9c9fec0f 100644
--- a/opendaylight/oxygen/src/main/docker/Dockerfile
+++ b/opendaylight/oxygen/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/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 4a000bfb..cdd79657 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>${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>