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:
26 files changed
+2269
-7
No files matched your search
@@ -0,0 +1,47 @@
|
||||
# KDReports Installation
|
||||
FROM harbor.sl.defence-elec.de/proxydockerhub/library/ubuntu:26.04
|
||||
|
||||
LABEL maintainer="Legatus Team"
|
||||
LABEL description="KDReports installation for Qt6"
|
||||
LABEL version="2.3.0"
|
||||
|
||||
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 QT_VERSION=6.10.2
|
||||
ARG KDREPORTS_VERSION=2.3.0
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential cmake git \
|
||||
libqt6core6 libqt6gui6 libqt6widgets6 libqt6xml6 \
|
||||
qt6-base-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Clone and build KDReports
|
||||
RUN git clone --depth 1 --branch kdreports-${KDREPORTS_VERSION} \
|
||||
https://github.com/KDAB/KDReports.git /tmp/KDReports \
|
||||
&& cd /tmp/KDReports \
|
||||
&& mkdir build && cd build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DCMAKE_PREFIX_PATH=/opt/Qt/${QT_VERSION}/gcc_64 \
|
||||
-DKDReports_QT6=ON .. \
|
||||
&& cmake --build . -j$(nproc) \
|
||||
&& cmake --install . \
|
||||
&& rm -rf /tmp/KDReports
|
||||
|
||||
# Create header alias for legacy includes
|
||||
RUN ln -sfn /usr/local/include/KDReports-qt6 /usr/local/include/KDReports
|
||||
|
||||
# Verify installation
|
||||
RUN pkg-config --modversion KDReports-qt6 | grep -q "${KDREPORTS_VERSION}"
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
pipeline {
|
||||
agent any
|
||||
|
||||
environment {
|
||||
QT_VERSION = '6.10.2'
|
||||
KDREPORTS_VERSION = '2.3.0'
|
||||
HARBOR_REGISTRY = 'harbor.sl.defence-elec.de/proxydockerhub'
|
||||
IMAGE_NAME = 'kdreports'
|
||||
IMAGE_TAG = "${KDREPORTS_VERSION}"
|
||||
}
|
||||
|
||||
options {
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build KDReports Container') {
|
||||
steps {
|
||||
script {
|
||||
dir('external-dependencies/kdreports') {
|
||||
sh """
|
||||
docker build \
|
||||
--build-arg QT_VERSION=${QT_VERSION} \
|
||||
--build-arg KDREPORTS_VERSION=${KDREPORTS_VERSION} \
|
||||
-t ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} \
|
||||
.
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Verify KDReports') {
|
||||
steps {
|
||||
script {
|
||||
sh """
|
||||
docker run --rm ${HARBOR_REGISTRY}/${IMAGE_NAME}:${IMAGE_TAG} bash -c '
|
||||
pkg-config --modversion KDReports-qt6
|
||||
'
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Generate SBOM') {
|
||||
steps {
|
||||
script {
|
||||
dir('external-dependencies/kdreports') {
|
||||
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/kdreports/Dockerfile"
|
||||
|
||||
# Generate CycloneDX SBOM, SLSA provenance, and license report
|
||||
bash ../scripts/generate-sbom.sh kdreports ${KDREPORTS_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,43 @@
|
||||
# KDReports
|
||||
|
||||
KDReports installation pipeline for Qt6 support.
|
||||
|
||||
## Version
|
||||
|
||||
- **KDReports:** 2.3.0 (kdreports-2.3.0 tag)
|
||||
- **Repository:** https://github.com/KDAB/KDReports
|
||||
- **License:** GPL/Commercial
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
git clone --depth 1 --branch kdreports-2.3.0 https://github.com/KDAB/KDReports.git /tmp/KDReports
|
||||
cd /tmp/KDReports
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DCMAKE_PREFIX_PATH=/opt/Qt/6.10.2/gcc_64 \
|
||||
-DKDReports_QT6=ON ..
|
||||
cmake --build . -j$(nproc)
|
||||
cmake --install .
|
||||
```
|
||||
|
||||
## Header Alias
|
||||
|
||||
For legacy `<KDReports/...>` includes:
|
||||
|
||||
```bash
|
||||
ln -sfn /usr/local/include/KDReports-qt6 /usr/local/include/KDReports
|
||||
```
|
||||
|
||||
## Verification
|
||||
|
||||
```bash
|
||||
pkg-config --modversion KDReports-qt6
|
||||
```
|
||||
|
||||
## SBOM
|
||||
|
||||
- `sbom/kdreports-2.3.0-sbom.json`
|
||||
- `sbom/kdreports-2.3.0-provenance.json`
|
||||
- `sbom/kdreports-2.3.0-licenses.md`
|
||||
Reference in new issue
Block a user