Adds CI CD with deb for external deps

This commit is contained in:
torsten committed 2026-11-06 18:15:17 +00:00
1 parent 03d48b76e4
commit 7373cb8d73
82 files changed
+3547 -3

No files matched your search

+110
View File
@@ -0,0 +1,110 @@
pipeline {
agent any
environment {
TMSIF_VERSION = '1.0.0'
HARBOR_REGISTRY = 'harbor.sl.defence-elec.de/proxydockerhub'
IMAGE_NAME = 'tmsif'
IMAGE_TAG = "${TMSIF_VERSION}"
OFFLINE_CACHE_PATH = '/opt/offline-cache/tmsif'
}
options {
timeout(time: 20, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Prepare License Files') {
steps {
script {
// LICENSE HANDLING: TMSIF uses contract-based licensing.
// Customer has lifetime license contract - no license file required.
// License is managed at contract level, not file-based.
// DEB package (libtmsif-dev) will be installed from internal SCM repository.
sh """
echo "TMSIF license: Contract-based (no file required)"
"""
}
}
}
stage('Build tmsif Container') {
steps {
script {
dir('external-dependencies/tmsif') {
sh """
docker build \
--build-arg TMSIF_VERSION=${TMSIF_VERSION} \
-t ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
.
"""
}
}
}
}
stage('Verify tmsif') {
steps {
script {
sh """
docker run --rm ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} bash -c '
ls -la /opt/tmsif/
'
"""
}
}
}
stage('Generate SBOM') {
steps {
script {
dir('external-dependencies/tmsif') {
sh """
mkdir -p sbom
# Set environment variables for SBOM generation
export GIT_URL="${env.GIT_URL}"
export GIT_COMMIT="${env.GIT_COMMIT}"
export BUILD_NUMBER="${env.BUILD_NUMBER}"
export DOCKERFILE_PATH="external-dependencies/tmsif/Dockerfile"
# Generate CycloneDX SBOM, SLSA provenance, and license report
bash ../scripts/generate-sbom.sh tmsif ${TMSIF_VERSION} ./sbom
"""
}
}
}
}
stage('Push to Registry') {
steps {
script {
withCredentials([usernamePassword(
credentialsId: 'harbor-credentials',
usernameVariable: 'HARBOR_USER',
passwordVariable: 'HARBOR_PASSWORD'
)]) {
sh """
echo ${HARBOR_PASSWORD} | docker login ${HARBOR_REGISTRY} -u ${HARBOR_USER} --password-stdin
docker push ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG}
docker logout ${HARBOR_REGISTRY}
"""
}
}
}
}
}
post {
always {
cleanWs()
}
}
}