diff --git a/technologies/job/java-scala/java-scala-21/Dockerfile b/technologies/job/java-scala/java-scala-21/Dockerfile new file mode 100644 index 000000000..84e53d57b --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/Dockerfile @@ -0,0 +1,21 @@ +FROM openjdk:21-slim-bookworm + +ENV HADOOP_CONF_DIR=/etc/hadoop/conf + +ENV DEBIAN_FRONTEND noninteractive + +# LIGHT DEPENDENCIES START +RUN apt update -qq && apt install -yqq --no-install-recommends \ + ftp wget curl unzip telnet openssh-client krb5-user && \ + rm -rf /var/lib/apt/lists/* +# LIGHT DEPENDENCIES END + +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/hadoop/lib/native" + +# Move scripts and frequently changing directive to the end of the build +COPY entrypoint /entrypoint +RUN chmod 755 /entrypoint + +WORKDIR /sandbox + +ENTRYPOINT ["bash","/entrypoint"] diff --git a/technologies/job/java-scala/java-scala-21/build.gradle.kts b/technologies/job/java-scala/java-scala-21/build.gradle.kts new file mode 100644 index 000000000..b814e94a3 --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/build.gradle.kts @@ -0,0 +1,22 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright 2019-2021. + * + * 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 + * + * https://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. + */ +import com.bmuschko.gradle.docker.DockerRemoteApiPlugin +import com.saagie.technologies.SaagieTechnologiesGradlePlugin + +apply() +apply() diff --git a/technologies/job/java-scala/java-scala-21/buildMe b/technologies/job/java-scala/java-scala-21/buildMe new file mode 100644 index 000000000..f32a5804e --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/buildMe @@ -0,0 +1 @@ +true \ No newline at end of file diff --git a/technologies/job/java-scala/java-scala-21/context.yaml b/technologies/job/java-scala/java-scala-21/context.yaml new file mode 100644 index 000000000..b62e90eed --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/context.yaml @@ -0,0 +1,19 @@ +id: "21" +label: "21" +available: true +recommended: true +trustLevel: stable +job: + features: + - type: COMMAND_LINE + label: Command line + mandatory: true + comment: Linux shell command to launch the job. + defaultValue: java -jar {file} arg1 arg2 + - type: ARTIFACT + label: Package + mandatory: true + comment: "Compatible upload file : .jar" + - type: SCHEDULER + label: Scheduled + mandatory: true diff --git a/technologies/job/java-scala/java-scala-21/dockerInfo.yaml b/technologies/job/java-scala/java-scala-21/dockerInfo.yaml new file mode 100644 index 000000000..32380179e --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/dockerInfo.yaml @@ -0,0 +1,4 @@ +image: saagie/java-scala +baseTag: 21 +dynamicVersion: 1.185.0_java-21 +version: 21-1.185.0_java-21 diff --git a/technologies/job/java-scala/java-scala-21/entrypoint b/technologies/job/java-scala/java-scala-21/entrypoint new file mode 100644 index 000000000..69ad90c0f --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/entrypoint @@ -0,0 +1,9 @@ +#!/bin/bash + +set -euo pipefail + + +if test -f main_script; +then sh ./main_script; +else exec "$@" +fi; \ No newline at end of file diff --git a/technologies/job/java-scala/java-scala-21/image_test.yaml b/technologies/job/java-scala/java-scala-21/image_test.yaml new file mode 100644 index 000000000..54ede13c7 --- /dev/null +++ b/technologies/job/java-scala/java-scala-21/image_test.yaml @@ -0,0 +1,83 @@ +schemaVersion: "2.0.0" + +metadataTest: + env: + - key: LANG + value: "C.UTF-8" + - key: JAVA_HOME + value: "/usr/local/openjdk-21" + - key: "HADOOP_CONF_DIR" + value: "/etc/hadoop/conf" + +fileExistenceTests: + - name: "entrypoint" + path: "/entrypoint" + shouldExist: true + permissions: "-rwxr-xr-x" + - name: "kinit" + path: "/usr/bin/kinit" + shouldExist: true + permissions: "-rwxr-xr-x" + +fileContentTests: + - name: "entrypoint" + path: "/entrypoint" + expectedContents: ["sh ./main_script"] + +commandTests: + - name: "ftp" + args: ["-h"] + command: "ftp" + expectedError: ["ftp: invalid option -- 'h'"] + exitCode: 1 + + - name: "wget" + args: ["--help"] + command: "wget" + exitCode: 0 + + - name: "curl" + args: ["--help"] + command: "curl" + exitCode: 0 + + - name: "unzip" + args: ["--help"] + command: "unzip" + exitCode: 0 + + - name: "tar" + args: ["--help"] + command: "tar" + exitCode: 0 + + - name: "telnet" + command: "which" + args: ["telnet"] + expectedOutput: ["/usr/bin/telnet"] + exitCode: 0 + + - name: "scp" + command: "which" + args: ["scp"] + expectedOutput: ["/usr/bin/scp"] + exitCode: 0 + + - name: "java installation" + command: "which" + args: ["java"] + expectedOutput: ["/usr/local/openjdk-21/bin/java"] + + - name: "java version" + command: "java" + args: ["-version"] + expectedError: ['openjdk version "21'] + + - name: "krb5-user installation" + command: "kinit" + expectedError: ['kinit: Configuration file does not specify default realm when parsing name root'] + exitCode: 1 + + - name: "Workdir" + command: "pwd" + expectedOutput: ["/sandbox"] diff --git a/technologies/job/java-scala/metadata.yaml b/technologies/job/java-scala/metadata.yaml index 887bd6727..99c695dfa 100644 --- a/technologies/job/java-scala/metadata.yaml +++ b/technologies/job/java-scala/metadata.yaml @@ -56,4 +56,27 @@ contexts: dockerInfo: image: "saagie/java-scala" baseTag: "17" - version: "17-1.132.0" \ No newline at end of file + version: "17-1.132.0" + - id: "21" + label: "21" + available: true + recommended: true + trustLevel: stable + job: + features: + - type: COMMAND_LINE + label: Command line + mandatory: true + comment: Linux shell command to launch the job. + defaultValue: java -jar {file} arg1 arg2 + - type: ARTIFACT + label: Package + mandatory: true + comment: "Compatible upload file : .jar" + - type: SCHEDULER + label: Scheduled + mandatory: true + dockerInfo: + image: "saagie/java-scala" + baseTag: "21" + version: "21-1.185.0_java-21" \ No newline at end of file diff --git a/version.properties b/version.properties index bd184a7ba..e080f1bc9 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ -version.buildmeta= +version.buildmeta=java-21 version.major=1 version.minor=185 version.patch=0 version.prerelease= -version.semver=1.185.0 +version.semver=1.185.0+java-21