Update Jenkinsfile

This commit is contained in:
Anupong Hompan 2025-10-20 12:15:23 +07:00
parent e86f92c9e4
commit 5be87a71e2

34
Jenkinsfile vendored
View File

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