Add external dependencies CI/CD pipelines with SBOM generation

- Create external-dependencies directory structure with per-package pipelines
- Add DEPENDENCIES-INVENTORY.md with comprehensive dependency tracking
- Create ubuntu-26.04-build-container base image with all dependencies
- Add per-package Jenkinsfiles: log4qt, grantlee, googletest, postgresql, qt6-framework, kdreports
- Add SBOM generation script (generate-sbom.sh) for CycloneDX, SLSA v1.0, and license reports
- Integrate SBOM generation into all Jenkins pipelines
- Add external-dependencies/README.md with usage and security documentation
- Exclude proprietary license files (rti_license.dat) from git tracking

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 01M6KNFNMSPW4SY4J4SQTTPVBP
This commit is contained in:
torstenandCopilot committed 2026-11-04 16:15:13 +00:00
1 parent f30e3fdc4e
commit 505b05cfaa
26 files changed
+2269 -7

No files matched your search

@@ -0,0 +1,44 @@
# GoogleTest Installation
FROM harbor.sl.defence-elec.de/proxydockerhub/library/ubuntu:26.04
LABEL maintainer="Legatus Team"
LABEL description="GoogleTest testing framework"
LABEL version="1.15.2"
ENV DEBIAN_FRONTEND=noninteractive
ARG HTTP_PROXY=""
ARG HTTPS_PROXY=""
ARG NO_PROXY="localhost,127.0.0.1,.sl.defence-elec.de"
ENV http_proxy=${HTTP_PROXY}
ENV https_proxy=${HTTPS_PROXY}
ENV no_proxy=${NO_PROXY}
ARG GTEST_VERSION=1.15.2
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake git \
&& rm -rf /var/lib/apt/lists/*
# Clone and build GoogleTest
RUN git clone --depth 1 --branch v${GTEST_VERSION} \
https://github.com/google/googletest.git /tmp/googletest \
&& cd /tmp/googletest \
&& mkdir build && cd build \
&& cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS=ON \
.. \
&& cmake --build . -j$(nproc) \
&& cmake --install . \
&& rm -rf /tmp/googletest
# Update library cache
RUN ldconfig
# Verify installation
RUN pkg-config --modversion gtest | grep -q "${GTEST_VERSION}"
CMD ["/bin/bash"]
+95
View File
@@ -0,0 +1,95 @@
pipeline {
agent any
environment {
GTEST_VERSION = '1.15.2'
HARBOR_REGISTRY = 'harbor.sl.defence-elec.de/proxydockerhub'
IMAGE_NAME = 'googletest'
IMAGE_TAG = "${GTEST_VERSION}"
}
options {
timeout(time: 20, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build GoogleTest Container') {
steps {
script {
dir('external-dependencies/googletest') {
sh """
docker build \
--build-arg GTEST_VERSION=${GTEST_VERSION} \
-t ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
.
"""
}
}
}
}
stage('Verify GoogleTest') {
steps {
script {
sh """
docker run --rm ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} bash -c '
pkg-config --modversion gtest
'
"""
}
}
}
stage('Generate SBOM') {
steps {
script {
dir('external-dependencies/googletest') {
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/googletest/Dockerfile"
# Generate CycloneDX SBOM, SLSA provenance, and license report
bash ../scripts/generate-sbom.sh googletest ${GTEST_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()
}
}
}
@@ -0,0 +1,35 @@
# GoogleTest
GoogleTest testing framework installation pipeline.
## Version
- **GoogleTest:** 1.15.2 (v1.15.2 tag)
- **Repository:** https://github.com/google/googletest
- **License:** BSD 3-Clause
## Installation
```bash
git clone --depth 1 --branch v1.15.2 https://github.com/google/googletest.git /tmp/googletest
cd /tmp/googletest
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_SHARED_LIBS=ON \
..
cmake --build . -j$(nproc)
cmake --install .
```
## Verification
```bash
pkg-config --modversion gtest
```
## SBOM
- `sbom/googletest-1.15.2-sbom.json`
- `sbom/googletest-1.15.2-provenance.json`
- `sbom/googletest-1.15.2-licenses.md`