Adds CI CD with deb for external deps
This commit is contained in:
82 files changed
+3547
-3
No files matched your search
+112
@@ -0,0 +1,112 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
ARCGIS_VERSION = '300.0.0'
|
||||
HARBOR_REGISTRY = 'harbor.sl.defence-elec.de/proxydockerhub'
|
||||
IMAGE_NAME = 'arcgis'
|
||||
IMAGE_TAG = "${ARCGIS_VERSION}"
|
||||
OFFLINE_CACHE_PATH = '/opt/offline-cache/arcgis'
|
||||
}
|
||||
|
||||
options {
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
stage('Prepare License Files') {
|
||||
steps {
|
||||
script {
|
||||
// LICENSE HANDLING: ArcGIS uses embedded ini-file licenses.
|
||||
// Map-specific licenses are embedded in 19 .ini files in Lts/Viewer/SituationMap/Map/.
|
||||
// Customer has lifetime license contract - ini files contain license strings.
|
||||
// No separate license file required; licenses travel with map configuration.
|
||||
// DEB package (libarcgis-maps-sdk-qt-dev) will be installed from internal SCM repository.
|
||||
sh """
|
||||
echo "ArcGIS license: Embedded in map configuration ini files"
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build ArcGIS Container') {
|
||||
steps {
|
||||
script {
|
||||
dir('external-dependencies/arcgis') {
|
||||
sh """
|
||||
docker build \
|
||||
--build-arg ARCGIS_VERSION=${ARCGIS_VERSION} \
|
||||
-t ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
|
||||
.
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Verify ArcGIS') {
|
||||
steps {
|
||||
script {
|
||||
sh """
|
||||
docker run --rm ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} bash -c '
|
||||
ls -la /opt/ArcGIS/MapsSDK_Qt_300.0.0/
|
||||
test -d /opt/ArcGIS/MapsSDK_Qt_300.0.0/qt300.0.0/sdk
|
||||
'
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate SBOM') {
|
||||
steps {
|
||||
script {
|
||||
dir('external-dependencies/arcgis') {
|
||||
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/arcgis/Dockerfile"
|
||||
|
||||
# Generate CycloneDX SBOM, SLSA provenance, and license report
|
||||
bash ../scripts/generate-sbom.sh arcgis ${ARCGIS_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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user