Skip to content

Commit

Permalink
Updated libs and buildx helper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
milux committed Nov 3, 2023
1 parent fb50b22 commit b204eb6
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 76 deletions.
9 changes: 0 additions & 9 deletions buildx/docker-bake-multi.hcl

This file was deleted.

4 changes: 4 additions & 0 deletions buildx/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
target "build-container" {
output = ["type=docker"]
context = "../build-container"
tags = ["fraunhoferaisec/docker-build:develop"]
}

target "core" {
output = ["type=docker"]
context = "../ids-connector"
tags = ["fraunhoferaisec/trusted-connector-core:develop"]
}
40 changes: 24 additions & 16 deletions buildx/docker-buildx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
exit 1
fi

OPTIONS=t:b:f:s
LONGOPTS=base-image:,docker-build-tag:,file:,targets:,skip-build,build-container,fast
OPTIONS=t:b:s
LONGOPTS=base-image:,docker-build-tag:,targets:,platforms:,skip-build,build-container,fast

! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
Expand All @@ -32,30 +32,35 @@ fi

eval set -- "$PARSED"

DOCKER_BUILD_TAG_ARG="develop"
DOCKER_BUILD_TAGS="develop"
BASE_IMAGE_ARG="gcr.io/distroless/java17-debian11"
TARGETS="core"
FILES=""
OUTPUT_TYPE="docker"
BAKE_ARGS=""
BUILD_CONTAINER=0
SKIP_BUILD=0
FAST_BUILD=0

while true; do
case "$1" in
-f | --file)
FILES="${FILES}-f $2 "
shift 2
;;
--targets)
TARGETS="$2"
shift 2
;;
--platforms)
OUTPUT_TYPE="registry"
for p in $2; do
BAKE_ARGS="$BAKE_ARGS --set='*.platform=$p'"
done
shift 2
;;
-b | --base-image)
BASE_IMAGE_ARG="$2"
shift 2
;;
-t | --docker-build-tag)
DOCKER_BUILD_TAG_ARG="$2"
DOCKER_BUILD_TAGS="$DOCKER_BUILD_TAGS $2"
BAKE_ARGS="$BAKE_ARGS --set='*.tags=$2'"
shift 2
;;
--build-container)
Expand All @@ -81,19 +86,22 @@ while true; do
esac
done

# Complete BAKE_ARGS
BAKE_ARGS="$BAKE_ARGS --set '*.output=type=$OUTPUT_TYPE'"

# Enable experimental Docker features (buildx)
export DOCKER_CLI_EXPERIMENTAL="enabled"

# Export vars for buildx bake yaml resolution
export DOCKER_BUILD_TAG="$DOCKER_BUILD_TAG_ARG"
# Export vars for Dockerfile
export BASE_IMAGE="$BASE_IMAGE_ARG"

printf "######################################################################\n"
printf "Using build tag \"%s\" and base image \"%s\"\n" "$DOCKER_BUILD_TAG" "$BASE_IMAGE"
printf "Using build tags \"%s\" and base image \"%s\"\n" "$DOCKER_BUILD_TAGS" "$BASE_IMAGE"
printf "######################################################################\n\n"

if [ $BUILD_CONTAINER = 1 ]; then
echo "Building build-container via \"docker buildx bake build-container ${FILES}$*\"..."
eval "docker buildx bake build-container ${FILES}$*"
echo "Building build-container via \"docker buildx bake build-container${BAKE_ARGS}$*\"..."
eval "docker buildx bake build-container${BAKE_ARGS}$*"
exit
fi
if [ $SKIP_BUILD = 0 ]; then
Expand Down Expand Up @@ -123,5 +131,5 @@ printf "######################################################################\n
printf "Detected project version: %s\n" "$PROJECT_VERSION"
printf "######################################################################\n\n"

echo "Building images via \"docker buildx bake $TARGETS ${FILES}$*\"..."
eval "docker buildx bake $TARGETS ${FILES}$*"
echo "Building images via \"docker buildx bake ${TARGETS}${BAKE_ARGS}$*\"..."
eval "docker buildx bake ${TARGETS}${BAKE_ARGS}$*"
14 changes: 0 additions & 14 deletions buildx/docker-compose.yml

This file was deleted.

52 changes: 26 additions & 26 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[versions]
idscp2 = "0.18.1"
ktlint = "0.48.2"
ktlint = "0.50.0"

# Kotlin library/compiler version
kotlin = "1.8.10"
kotlinxCoroutines = "1.6.4"
kotlin = "1.9.20"
kotlinxCoroutines = "1.7.3"
# HTTP client
ktor = "2.2.3"
ktor = "2.3.5"

# The used version of the infomodel from IESE
infomodel = "4.1.3"
Expand All @@ -17,21 +17,21 @@ jaxbCore = "2.3.0.1"
jaxbImpl = "2.3.7"
jaxActivation = "1.2.0"

camel = "3.18.5"
camel = "3.18.8"
influxDB = "2.23"

guava = "31.1-jre"
guava = "32.1.3-jre"
junit4 = "4.13.2"
junit5 = "5.9.2"
mockito = "5.1.1"
mapdb = "3.0.9"
jnrunix = "0.38.19"
protobuf = "3.22.0"
junit5 = "5.10.0"
mockito = "5.7.0"
mapdb = "3.0.10"
jnrunix = "0.38.21"
protobuf = "3.25.0"
httpclient = "4.5.14"

# Needed for policy reasoning with 2p (formerly tuProlog)
tup = "4.1.1"
commonsText = "1.10.0"
commonsText = "1.11.0"
protonpack = "1.16"

# Needed for ACME module
Expand All @@ -43,26 +43,26 @@ javaxJson = "1.1.4"
dockerJavaApi = "0.0.13"

# We will pull in a newer version of jackson because of security fixes
jackson = "2.14.2"
jacksonDatabind = "2.14.2"
jackson = "2.15.3"
jacksonDatabind = "2.15.3"

orgJson = "20220320"

# Needed for camel multipart processor
commonsFileUpload = "1.5"

# Needed for info model manager
commonsCli = "1.5.0"
commonsCli = "1.6.0"
javaxValidation = "2.0.1.Final"

# Needed for web console
auth0Jwt = "4.3.0"
swagger = "1.6.9"
auth0Jwt = "4.4.0"
swagger = "1.6.12"
jose4j = "0.9.3"

jetty = "9.4.50.v20221201"
springBoot = "3.0.2"
springSecurity = "6.0.2"
jetty = "9.4.53.v20231009"
springBoot = "3.1.5"
springSecurity = "6.1.5"
bouncyCastle = "1.70"

[libraries]
Expand Down Expand Up @@ -152,13 +152,13 @@ jaxbImpl = ["jaxb-core", "jaxb-impl"]

[plugins]
springboot = { id = "org.springframework.boot", version.ref = "springBoot" }
spring-dependencyManagement = { id = "io.spring.dependency-management", version = "1.1.0" }
spring-dependencyManagement = { id = "io.spring.dependency-management", version = "1.1.3" }
swagger = { id = "com.benjaminsproule.swagger", version = "1.0.14" }
protobuf = { id = "com.google.protobuf", version = "0.9.2" }
protobuf = { id = "com.google.protobuf", version = "0.9.4" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-plugin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" }
spotless = { id = "com.diffplug.spotless", version = "6.15.0" }
licenseReport = { id = "com.github.jk1.dependency-license-report", version = "2.1" }
versions = { id = "com.github.ben-manes.versions", version = "0.46.0" }
buildconfig = { id = "com.github.gmazzo.buildconfig", version = "3.1.0" }
spotless = { id = "com.diffplug.spotless", version = "6.22.0" }
licenseReport = { id = "com.github.jk1.dependency-license-report", version = "2.5" }
versions = { id = "com.github.ben-manes.versions", version = "0.49.0" }
buildconfig = { id = "com.github.gmazzo.buildconfig", version = "4.1.2" }
node = { id = "com.github.node-gradle.node", version = "3.5.1" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# 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/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# 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"'
Expand Down Expand Up @@ -143,12 +143,16 @@ 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
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
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.
Expand Down
15 changes: 9 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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%

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b204eb6

Please sign in to comment.