prepare dist for chlorine 07/132907/2
authorMichael Dürre <michael.duerre@highstreet-technologies.com>
Thu, 12 Jan 2023 11:18:31 +0000 (12:18 +0100)
committerMichael Dürre <michael.duerre@highstreet-technologies.com>
Thu, 12 Jan 2023 11:23:59 +0000 (12:23 +0100)
add java17 base image. switch chlorine to j17

Issue-ID: CCSDK-3832
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Change-Id: Ib2f3fd216eac4743a338299385e6bdbe52485275
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
alpine/java11/pom.xml
alpine/java17/pom.xml [new file with mode: 0644]
alpine/java17/src/main/docker/Dockerfile [new file with mode: 0644]
alpine/pom.xml
opendaylight/chlorine/chlorine-alpine/pom.xml
opendaylight/chlorine/chlorine-alpine/src/main/docker/Dockerfile

index 3c73461..dbb640e 100644 (file)
@@ -26,9 +26,9 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.codehaus.groovy.maven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <version>1.0</version>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>groovy-maven-plugin</artifactId>
+                <version>2.1.1</version>
                 <executions>
                     <execution>
                         <phase>validate</phase>
diff --git a/alpine/java17/pom.xml b/alpine/java17/pom.xml
new file mode 100644 (file)
index 0000000..95e9bd1
--- /dev/null
@@ -0,0 +1,116 @@
+<?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-alpine-root</artifactId>
+        <version>1.5.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>distribution-j17-alpine</artifactId>
+    <packaging>pom</packaging>
+
+    <name>ccsdk-distribution :: alpine :: java17</name>
+    <description>Creates base alpine Docker container</description>
+    <organization>
+        <name>openECOMP</name>
+    </organization>
+
+    <properties>
+        <image.name>onap/ccsdk-alpine-j17-image</image.name>
+        <base.image>eclipse-temurin</base.image>
+        <base.image.version>17.0.4.1_1-jdk-alpine</base.image.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>groovy-maven-plugin</artifactId>
+                <version>2.1.1</version>
+                <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>
+                <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.34.0</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <noCache>true</noCache>
+                                        <contextDir>${basedir}/target/docker-stage</contextDir>
+                                        <dockerFile>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>
+                            <verbose>${docker.verbose}</verbose>
+                            <skipPush>${docker.skip.push}</skipPush>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>build-push-images</id>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
diff --git a/alpine/java17/src/main/docker/Dockerfile b/alpine/java17/src/main/docker/Dockerfile
new file mode 100644 (file)
index 0000000..192d618
--- /dev/null
@@ -0,0 +1,19 @@
+# Base alpine with added packages needed for open ecomp
+FROM ${base.image}:${base.image.version}
+MAINTAINER CCSDK  Team (onap-ccsdk@lists.onap.org)
+USER root
+
+ARG HTTP_PROXY
+ARG HTTPS_PROXY
+
+ENV HTTP_PROXY  ${HTTP_PROXY}
+ENV http_proxy  ${HTTP_PROXY}
+ENV HTTPS_PROXY ${HTTPS_PROXY}
+ENV https_proxy ${HTTPS_PROXY}
+
+ENV JAVA_HOME /opt/java/openjdk
+
+# Add tools needed for OpenDaylight
+RUN apk update && apk --no-cache add sudo bash iputils openssl git mysql-client nodejs npm python3 py3-pip graphviz unzip rsync nss
+
+USER onap
index 6e61c9d..f99b368 100644 (file)
@@ -16,5 +16,6 @@
 
     <modules>
         <module>java11</module>
+        <module>java17</module>
     </modules>
 </project>
index b490fcd..0ea3598 100644 (file)
     <properties>
         <image.name>onap/ccsdk-odl-chlorine-alpine-image</image.name>
         <odl.karaf.artifactId>onap-karaf</odl.karaf.artifactId>
-        <odl.shiro.version>0.15.5</odl.shiro.version>
+        <odl.shiro.version>0.16.6</odl.shiro.version>
     </properties>
 
     <build>
         <plugins>
 
             <plugin>
-                <groupId>org.codehaus.groovy.maven</groupId>
-                <artifactId>gmaven-plugin</artifactId>
-                <version>1.0</version>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>groovy-maven-plugin</artifactId>
+                <version>2.1.1</version>
                 <executions>
                     <execution>
                         <phase>validate</phase>
index 15b17d8..4506311 100644 (file)
@@ -1,6 +1,6 @@
 # Prepare stage for multistage image build
 ## START OF STAGE0 ##
-FROM onap/ccsdk-alpine-j11-image:${project.docker.latestfulltag.version} AS stage0
+FROM onap/ccsdk-alpine-j17-image:${project.docker.latestfulltag.version} AS stage0
 USER root
 
 ENV ODL_HOME /opt/opendaylight/current