From 7a01e8f36ece4f8c065d9d0672728ace571d3a2f Mon Sep 17 00:00:00 2001 From: Anupong Hompan Date: Tue, 21 Oct 2025 00:30:32 +0700 Subject: [PATCH] Update JK --- Jenkinsfile | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4d733ab..bb613ae 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,15 +42,28 @@ pipeline { apt-get update apt-get install -y --no-install-recommends \ ca-certificates curl unzip jq git openjdk-21-jre-headless + + # --- Install ICU runtime (Debian uses versioned package names) --- + if ! ldconfig -p | grep -qi libicu; then + PKG="$(apt-cache search '^libicu[0-9]+$' | awk '{print $1}' | head -n1 || true)" + if [ -n "$PKG" ]; then + echo "Installing ICU package: ${PKG}" + apt-get install -y --no-install-recommends "${PKG}" + else + # Fallback: dev package also provides the libs (heavier) + echo "Falling back to libicu-dev..." + apt-get install -y --no-install-recommends libicu-dev + fi + fi fi - mkdir -p "${DOTNET_ROOT}" + # Install .NET SDK locally for the build user + mkdir -p "${WORKSPACE}/.dotnet" curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh - bash dotnet-install.sh --channel 9.0 --install-dir "${DOTNET_ROOT}" - dotnet --info + bash dotnet-install.sh --channel 9.0 --install-dir "${WORKSPACE}/.dotnet" - # เตรียม cache สำหรับ Dependency-Check - mkdir -p "${DC_DATA}" + export PATH="${WORKSPACE}/.dotnet:${PATH}" + dotnet --info ''' } }