diff --git a/Chart.yaml b/Chart.yaml index 1e8c5c40..f3403d88 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -30,16 +30,16 @@ dependencies: condition: haproxy-ingress.install - name: nginx-ingress-controller - version: 11.6.11 + version: 11.6.13 repository: "https://charts.bitnami.com/bitnami" condition: nginx-ingress-controller.install - name: postgresql - version: 16.4.16 + version: 16.6.3 repository: "https://charts.bitnami.com/bitnami" condition: postgresql.install - name: rabbitmq - version: 15.3.3 + version: 15.5.1 repository: "https://charts.bitnami.com/bitnami" condition: rabbitmq.install diff --git a/build.gradle.kts b/build.gradle.kts index 743e4975..bfb47937 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,11 @@ import com.github.gradle.node.yarn.task.YarnTask import java.time.LocalDateTime import java.time.format.DateTimeFormatter -import org.jetbrains.kotlin.de.undercouch.gradle.tasks.download.Download import java.io.ByteArrayOutputStream import org.apache.commons.lang.SystemUtils.* import java.time.Instant +import de.undercouch.gradle.tasks.download.Download +import org.jetbrains.kotlin.gradle.dsl.JvmTarget buildscript { repositories { @@ -29,12 +30,13 @@ buildscript { } plugins { - kotlin("jvm") version "1.8.10" + kotlin("jvm") version "2.1.20" id("com.github.node-gradle.node") version "7.0.2" id("idea") id("nebula.release") version (properties["nebulaReleasePluginVersion"] as String) id("maven-publish") + id("de.undercouch.download") version "5.6.0" } apply(plugin = "ai.digital.gradle-commit") @@ -43,20 +45,21 @@ apply(plugin = "com.xebialabs.dependency") group = "ai.digital.deploy.helm" project.defaultTasks = listOf("build") +val languageLevel = properties["languageLevel"] as String val helmVersion = properties["helmVersion"] val operatorSdkVersion = properties["operatorSdkVersion"] val openshiftPreflightVersion = properties["openshiftPreflightVersion"] val kustomizeVersion = properties["kustomizeVersion"] val operatorBundleChannels = properties["operatorBundleChannels"] val operatorBundleDefaultChannel = properties["operatorBundleDefaultChannel"] + val os = detectOs() val arch = detectHostArch() val currentTime = Instant.now().toString() val releaseRepository = System.getenv()["RELEASE_REGISTRY"] ?: "xebialabsunsupported" val dockerHubRepository = System.getenv()["DOCKER_HUB_REPOSITORY"] ?: releaseRepository -val releasedVersion = System.getenv()["RELEASE_EXPLICIT"] ?: "25.1.0-${ - LocalDateTime.now().format(DateTimeFormatter.ofPattern("Mdd.Hmm")) -}" +val releasedVersion = System.getenv()["RELEASE_EXPLICIT"] ?: + "${project.version}-${LocalDateTime.now().format(DateTimeFormatter.ofPattern("Mdd.Hmm"))}" project.extra.set("releasedVersion", releasedVersion) val releasedAppVersion = System.getenv()["RELEASE_APP_EXPLICIT"] ?: releasedVersion project.extra.set("releasedAppVersion", releasedAppVersion) @@ -119,8 +122,8 @@ dependencies { } java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.toVersion(languageLevel) + targetCompatibility = JavaVersion.toVersion(languageLevel) withSourcesJar() withJavadocJar() } @@ -136,11 +139,11 @@ tasks.withType { tasks { compileKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() + compilerOptions.jvmTarget.set(JvmTarget.fromTarget(languageLevel)) } compileTestKotlin { - kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() + compilerOptions.jvmTarget.set(JvmTarget.fromTarget(languageLevel)) } val operatorImageUrl = "docker.io/$dockerHubRepository/deploy-operator:$releasedVersion" @@ -170,9 +173,9 @@ tasks { copy { from(tarTree(helmDir.file("helm.tar.gz"))) into(helmDir) - fileMode = 0b111101101 + filePermissions { unix("rwxr-xr-x") } } - exec { + project.exec { workingDir(helmDir) commandLine(helmCli, "version") } @@ -187,9 +190,9 @@ tasks { copy { from(operatorSdkDir.dir("operator-sdk-tool").file("operator-sdk")) into(operatorSdkDir) - fileMode = 0b111101101 + filePermissions { unix("rwxr-xr-x") } } - exec { + project.exec { workingDir(operatorSdkDir) commandLine(operatorSdkCli, "version") } @@ -205,9 +208,9 @@ tasks { copy { from(openshiftPreflightDir.dir("install").file("openshift-preflight")) into(openshiftPreflightDir) - fileMode = 0b111101101 + filePermissions { unix("rwxr-xr-x") } } - exec { + project.exec { workingDir(openshiftPreflightDir) commandLine(openshiftPreflightCli, "--version") } @@ -222,9 +225,9 @@ tasks { copy { from(tarTree(kustomizeDir.file("kustomize.tar.gz"))) into(kustomizeDir) - fileMode = 0b111101101 + filePermissions { unix("rwxr-xr-x") } } - exec { + project.exec { workingDir(kustomizeDir) commandLine(kustomizeCli, "version") } @@ -268,7 +271,7 @@ tasks { commandLine(helmCli, "dependency", "update", ".") doLast { - exec { + project.exec { workingDir(buildXldOperatorDir) commandLine("ls", "charts") } @@ -360,7 +363,7 @@ tasks { doLast { // config/manager/manager.yaml replace resource memory - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#memory: 128Mi#memory: 512Mi#g", @@ -410,7 +413,7 @@ tasks { copy { from(tarTree(helmDir.file("helm.tar.gz"))) into(buildXldDir) - fileMode = 0b111101101 + filePermissions { unix("rwxr-xr-x") } } } } @@ -430,21 +433,21 @@ tasks { doFirst { // operator/Dockerfile -> Dockerfile - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "/^FROM.*/r $sourceDockerFile", targetDockerFile) } // operator/Dockerfile replace VERSION - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${VERSION}#$releasedVersion#g", targetDockerFile) } // operator/watches.yaml -> watches.yaml - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "/^#.+kubebuilder:scaffold:watch.*/r $sourceWatchesFile", @@ -501,93 +504,93 @@ tasks { into(buildXldDir) duplicatesStrategy = DuplicatesStrategy.WARN } - exec { + project.exec { workingDir(buildXldDir.get().dir("config/samples")) commandLine(kustomizeCli, "edit", "add", "resource", "xld_minimal.yaml") } - exec { + project.exec { workingDir(buildXldDir.get().dir("config/samples")) commandLine(kustomizeCli, "edit", "add", "resource", "xld_placeholders.yaml") } - exec { + project.exec { workingDir(buildXldDir.get().dir("config/default")) commandLine(kustomizeCli, "edit", "remove", "resource", "../manager") } - exec { + project.exec { workingDir(buildXldDir.get().dir("config/default")) commandLine(kustomizeCli, "edit", "add", "resource", "../custom") } // config/manifests/bases/xld.clusterserviceversion.yaml replace VERSION - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${VERSION}#$releasedVersion#g", targetCsvFile) } // config/manifests/bases/xld.clusterserviceversion.yaml replace APP_VERSION - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${APP_VERSION}#$releasedAppVersion#g", targetCsvFile) } // config/custom/manager_config_patch.yaml replace APP_VERSION - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${APP_VERSION}#$releasedAppVersion#g", buildXldDir.get().dir("config/custom/manager_config_patch.yaml")) } // config/manifests/bases/xld.clusterserviceversion.yaml replace DOCKER_HUB_REPOSITORY - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${DOCKER_HUB_REPOSITORY}#$dockerHubRepository#g", targetCsvFile) } // config/custom/manager_config_patch.yaml replace DOCKER_HUB_REPOSITORY - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${DOCKER_HUB_REPOSITORY}#$dockerHubRepository#g", buildXldDir.get().dir("config/custom/manager_config_patch.yaml")) } // config/manifests/bases/xld.clusterserviceversion.yaml replace CONTAINER_IMAGE - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${CONTAINER_IMAGE}#$operatorImageUrl#g", targetCsvFile) } // config/manifests/bases/xld.clusterserviceversion.yaml replace CURRENT_TIME - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "s#\${CURRENT_TIME}#$currentTime#g", targetCsvFile) } - exec { + project.exec { workingDir(buildXldDir) commandLine("$operatorFolder/scripts/generate_skip_versions.sh", releasedVersion, targetCsvFile) } } doLast { // bundle.Dockerfile -> bundle.Dockerfile - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "/^LABEL operators.operatorframework.io.test.config.*/r $sourceDockerFile", targetDockerFile) } // annotations.yaml -> bundle/annotations.yaml - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "/^.*operators.operatorframework.io.test.config.v1.*/r $sourceAnnotationsFile", targetAnnotationsFile) } // bundle/annotations.yaml remove empty lines - exec { + project.exec { workingDir(buildXldDir) commandLine("sed", "-i.bak", "-e", "/^\$/d", @@ -712,7 +715,7 @@ tasks { val operatorChartDir = layout.buildDirectory.dir("xld/helm-charts/digitalai-deploy/charts") // postgresql - val postgresqlSubchart = "postgresql-16.4.16.tgz" + val postgresqlSubchart = "postgresql-16.6.3.tgz" val postgresqlOperatorChart = operatorChartDir.get().file(postgresqlSubchart) register("hotfixPostgresqlOperatorChart") { @@ -745,7 +748,7 @@ tasks { } // rabbitmq - val rabbitmqSubchart = "rabbitmq-15.3.3.tgz" + val rabbitmqSubchart = "rabbitmq-15.5.1.tgz" val rabbitmqOperatorChart = operatorChartDir.get().file(rabbitmqSubchart) register("hotfixRabbitmqOperatorChart") { @@ -816,14 +819,14 @@ tasks { doLast { logger.lifecycle("Openshift preflight container check $deployMasterImageUrl finished") - exec { + project.exec { workingDir(buildXldDir) commandLine(openshiftPreflightCli, "check", "container", deployCcImageUrl) } logger.lifecycle("Openshift preflight container check $deployCcImageUrl finished") - exec { + project.exec { workingDir(buildXldDir) commandLine(openshiftPreflightCli, "check", "container", deployTaskEngineImageUrl) @@ -878,8 +881,8 @@ publishing { } node { - version.set("20.14.0") - yarnVersion.set("1.22.22") + version.set(properties["nodeVersion"] as String) + yarnVersion.set(properties["yarnVersion"] as String) download.set(true) } diff --git a/gradle.properties b/gradle.properties index 689fb933..9cbcb86f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,16 @@ -#Fri Nov 03 14:55:06 CET 2023 -languageLevel=17 +version=25.3.0 +languageLevel=21 org.gradle.parallel=true xlDefaultsPluginVersion=3.0.1 org.gradle.caching=false -helmVersion=3.17.2 +helmVersion=3.17.3 gradleCommitPluginVersion=1.0.0-202.1009 nebulaReleasePluginVersion=17.1.0 xlPluginsPluginVersion=3.0.5 -operatorSdkVersion=1.39.1 +operatorSdkVersion=1.39.2 kustomizeVersion=5.6.0 operatorBundleDefaultChannel=beta openshiftPreflightVersion=1.11.1 operatorBundleChannels=beta +nodeVersion=20.14.0 +yarnVersion=1.22.22 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c0..c1962a79 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049..4eaec467 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0c..aeb74cbb 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,98 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +118,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +129,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +137,109 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 107acd32..93e3f59f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/operator/annotations.yaml b/operator/annotations.yaml index 7dd3c66a..23c69326 100644 --- a/operator/annotations.yaml +++ b/operator/annotations.yaml @@ -1,5 +1,5 @@ # Custom - com.redhat.openshift.versions: v4.11 + com.redhat.openshift.versions: v4.11-v4.18 com.redhat.delivery.operator.bundle: true com.redhat.deliver.backport: false diff --git a/operator/bundle.Dockerfile b/operator/bundle.Dockerfile index b93ab93d..f7fa3c31 100644 --- a/operator/bundle.Dockerfile +++ b/operator/bundle.Dockerfile @@ -1,4 +1,4 @@ -LABEL com.redhat.openshift.versions="v4.11" +LABEL com.redhat.openshift.versions="v4.11-v4.18" LABEL com.redhat.delivery.operator.bundle=true LABEL com.redhat.deliver.backport=false diff --git a/values.yaml b/values.yaml index 075a9bc3..a1cb9827 100644 --- a/values.yaml +++ b/values.yaml @@ -158,7 +158,7 @@ hooks: image: registry: docker.io repository: bitnami/kubectl - tag: 1.32.3-debian-12-r1 + tag: 1.32.3-debian-12-r4 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -264,7 +264,7 @@ hooks: image: registry: docker.io repository: bitnami/kubectl - tag: 1.32.3-debian-12-r1 + tag: 1.32.3-debian-12-r4 ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images @@ -738,7 +738,7 @@ centralConfiguration: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r40 + tag: 12-debian-12-r42 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -1615,7 +1615,7 @@ master: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r40 + tag: 12-debian-12-r42 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -2554,7 +2554,7 @@ worker: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r40 + tag: 12-debian-12-r42 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -3465,13 +3465,13 @@ nginx-ingress-controller: install: false ## @param nginx-ingress-controller.image.tag NGINX Ingress Controller image tag (immutable tags are recommended) image: - tag: 1.12.1-debian-12-r0 + tag: 1.12.1-debian-12-r3 ## Default 404 backend ## defaultBackend: ## @param nginx-ingress-controller.defaultBackend.image.tag Default backend image tag (immutable tags are recommended) image: - tag: 1.27.4-debian-12-r7 + tag: 1.27.4-debian-12-r9 ## @extra nginx-ingress-controller.extraArgs Additional command line arguments to pass to nginx-ingress-controller ## E.g. to specify the default SSL certificate you can use ## extraArgs: @@ -3510,7 +3510,7 @@ postgresql: install: true ## @param postgresql.image.tag PostgreSQL image tag (immutable tags are recommended) image: - tag: 17.4.0-debian-12-r8 + tag: 17.4.0-debian-12-r15 ## @param postgresql.hasReport Indicating that reporting database is enabled ## hasReport: true @@ -3627,7 +3627,7 @@ postgresql: enabled: true ## @param postgresql.volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended) image: - tag: 12-debian-12-r40 + tag: 12-debian-12-r42 ## @param postgresql.volumePermissions.containerSecurityContext.allowPrivilegeEscalation Controls whether a process can gain more privileges than its parent process ## @param postgresql.volumePermissions.containerSecurityContext.readOnlyRootFilesystem Mounts the container's root filesystem as read-only @@ -3655,7 +3655,7 @@ rabbitmq: install: true ## @param rabbitmq.image.tag RabbitMQ image tag (immutable tags are recommended) image: - tag: 4.0.7-debian-12-r1 + tag: 4.0.8-debian-12-r2 ## Clustering settings ## clustering: @@ -3773,7 +3773,7 @@ rabbitmq: enabled: true ## @param rabbitmq.volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended) image: - tag: 12-debian-12-r40 + tag: 12-debian-12-r42 ## Init container' Security Context ## Note: the chown of the data folder is done to containerSecurityContext.runAsUser