Update JK

This commit is contained in:
Anupong Hompan 2025-10-21 00:30:32 +07:00
parent 3e0eaa142b
commit 7a01e8f36e

23
Jenkinsfile vendored
View File

@ -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
'''
}
}