From 5be87a71e23a55272b50c7ae3270afe4d881d50a Mon Sep 17 00:00:00 2001 From: Anupong Hompan Date: Mon, 20 Oct 2025 12:15:23 +0700 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 92cb6a2..7cf468f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,6 +15,40 @@ pipeline { steps { checkout scm } } + stage('Install prerequisites') { + agent any + steps { + sh ''' + set -e + + install_deps() { + if command -v apt-get >/dev/null 2>&1; then + export DEBIAN_FRONTEND=noninteractive + apt-get update -y + # ICU + common .NET native deps + helpers + apt-get install -y --no-install-recommends \ + libicu libkrb5-3 zlib1g libstdc++6 ca-certificates curl unzip + # Fallback in case the meta "libicu" name doesn't exist on this distro + apt-get install -y --no-install-recommends libicu-dev || true + elif command -v dnf >/dev/null 2>&1; then + dnf install -y libicu krb5-libs zlib libstdc++ ca-certificates curl unzip + elif command -v yum >/dev/null 2>&1; then + yum install -y libicu krb5-libs zlib libstdc++ ca-certificates curl unzip + elif command -v apk >/dev/null 2>&1; then + apk add --no-cache icu-libs krb5-libs zlib libstdc++ ca-certificates curl unzip + else + echo "Unsupported package manager. Please install ICU manually." + exit 1 + fi + } + + install_deps + ''' + } + } + + + // Bootstrap .NET SDK if dotnet is missing stage('Bootstrap .NET SDK') { agent any