-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SRE-2832 Build: Update for larger Jenkinsfiles
Update Jenkinsfiles to support SCRIPT_SPLITTING_TRANSFORMATION per https://issues.jenkins.io/browse/JENKINS-56500 utils/githooks/README.md: Fix markuplint flagged issues. utils/scripts/helpers/install_maldet.ch : Fix defaults to be more implementation neutral. utils/scripts/helpers/repo-helper-*.sh : Optionally install CA needed to validate local repository mirrors. Dockerfiles modified to support intalling the CA. Dockerfile.code_scanning modified to allow specifying the fedora version used. Signed-off-by: John E. Malmberg <[email protected]>
- Loading branch information
1 parent
ae9f129
commit da3a953
Showing
22 changed files
with
387 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,34 @@ | |
# 'recipe' for Docker for code scanning. | ||
# | ||
|
||
# Pull base image | ||
FROM fedora:latest | ||
ARG FVERSION=latest | ||
FROM fedora:$FVERSION | ||
# Needed for later use of FVERSION | ||
ARG FVERSION | ||
LABEL maintainer="[email protected]" | ||
|
||
# Intermittent cache-bust. Used to reduce load on the actual CACHEBUST later. | ||
ARG CB0 | ||
|
||
# Use local repo server if present | ||
ARG REPO_FILE_URL | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to install OS updates basic tools and daos dependencies | ||
# COPY ./utils/scripts/install-fedora.sh /tmp/install.sh | ||
# script to setup local repo if available | ||
COPY ./utils/scripts/helpers/repo-helper-fedora.sh /tmp/repo-helper.sh | ||
|
||
RUN chmod +x /tmp/repo-helper.sh && \ | ||
/tmp/repo-helper.sh && \ | ||
rm -f /tmp/repo-helper.sh | ||
|
||
# Install Python Bandit scanner. | ||
RUN dnf -y upgrade && dnf -y install bandit && dnf clean all | ||
# The unset commands are currently needed for the combination of running | ||
# with a local repository, yet needing a proxy to reach outside repositories. | ||
# This needs to be moved to a shell script like above in the future to | ||
# properly only remove the proxy variables only when they need to be removed | ||
RUN unset HTTPS_PROXY && unset https_proxy && \ | ||
dnf -y upgrade && dnf -y install bandit && dnf clean all | ||
|
||
ARG CB1 | ||
RUN dnf -y upgrade && dnf clean all | ||
RUN unset HTTPS_PROXY && unset https_proxy && dnf -y upgrade && dnf clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright 2018-2024 Intel Corporation | ||
# Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# All rights reserved. | ||
# | ||
# 'recipe' for Docker to build an image of EL 8 based | ||
|
@@ -8,7 +9,7 @@ | |
# Pull base image | ||
ARG POINT_RELEASE= | ||
ARG BASE_DISTRO=rockylinux/rockylinux:8$POINT_RELEASE | ||
FROM $BASE_DISTRO as basic | ||
FROM $BASE_DISTRO AS basic | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 2: containerImage not pinned by hash
Click Remediation section below to solve this issue |
||
LABEL maintainer="[email protected]" | ||
# Needed for later use of BASE_DISTRO | ||
ARG BASE_DISTRO | ||
|
@@ -19,6 +20,7 @@ ARG CB0 | |
ARG REPO_FILE_URL | ||
ARG JENKINS_URL | ||
ARG REPOS | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to install OS updates basic tools and daos dependencies | ||
COPY ./utils/scripts/install-el8.sh /tmp/install.sh | ||
# script to setup local repo if available | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright 2022-2024 Intel Corporation | ||
# Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# All rights reserved. | ||
# | ||
# 'recipe' for Docker to build an image of EL 9 based | ||
|
@@ -8,7 +9,7 @@ | |
# Pull base image | ||
ARG POINT_RELEASE= | ||
ARG BASE_DISTRO=almalinux:9$POINT_RELEASE | ||
FROM $BASE_DISTRO as basic | ||
FROM $BASE_DISTRO AS basic | ||
LABEL maintainer="[email protected]" | ||
# Needed for later use of BASE_DISTRO | ||
ARG BASE_DISTRO | ||
|
@@ -19,6 +20,7 @@ ARG CB0 | |
ARG REPO_FILE_URL | ||
ARG JENKINS_URL | ||
ARG REPOS | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to install OS updates basic tools and daos dependencies | ||
COPY ./utils/scripts/install-el9.sh /tmp/install.sh | ||
# script to setup local repo if available | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright 2018-2024 Intel Corporation | ||
# Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# All rights reserved. | ||
# | ||
# 'recipe' for Docker to build an image of Leap based | ||
|
@@ -8,7 +9,7 @@ | |
# Pull base image | ||
ARG POINT_RELEASE= | ||
ARG BASE_DISTRO=registry.opensuse.org/opensuse/leap-dnf:15$POINT_RELEASE | ||
FROM $BASE_DISTRO as basic | ||
FROM $BASE_DISTRO AS basic | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 2: containerImage not pinned by hash
Click Remediation section below to solve this issue |
||
LABEL maintainer="[email protected]" | ||
# Needed for later use of BASE_DISTRO | ||
ARG BASE_DISTRO | ||
|
@@ -19,6 +20,7 @@ ARG CB0 | |
ARG REPO_FILE_URL | ||
ARG JENKINS_URL | ||
ARG REPOS | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to install OS updates basic tools and daos dependencies | ||
COPY ./utils/scripts/install-leap15.sh /tmp/install.sh | ||
# script to setup local repo if available | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Copyright 2018-2024 Intel Corporation | ||
# Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# All rights reserved. | ||
# | ||
# 'recipe' for Docker to build an image of Ubuntu-based environment for building the DAOS project. | ||
|
@@ -10,24 +11,22 @@ | |
ARG BASE_DISTRO=ubuntu:22.04 | ||
FROM $BASE_DISTRO | ||
LABEL maintainer="[email protected]" | ||
# Needed for later use of BASE_DISTRO | ||
ARG BASE_DISTRO | ||
|
||
# Intermittent cache-bust. Used to reduce load on the actual CB1 later. | ||
ARG CB0 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install basic tools | ||
COPY ./utils/scripts/install-ubuntu.sh /tmp/install.sh | ||
RUN echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/no-prompt | ||
RUN echo "APT::Install-Recommends \"false\";" > /etc/apt/apt.conf.d/no-recommends | ||
RUN apt-get update && \ | ||
apt-get upgrade && \ | ||
apt-get install gpg-agent software-properties-common && \ | ||
add-apt-repository ppa:longsleep/golang-backports && \ | ||
apt-get update && \ | ||
chmod +x /tmp/install.sh && \ | ||
/tmp/install.sh && \ | ||
apt-get clean all | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to setup local repo if available | ||
COPY ./utils/scripts/helpers/repo-helper-ubuntu.sh /tmp/repo-helper.sh | ||
|
||
RUN chmod +x /tmp/repo-helper.sh && \ | ||
/tmp/repo-helper.sh && \ | ||
rm -f /tmp/repo-helper.sh | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
# Pull base image | ||
FROM fedora:latest | ||
MAINTAINER daos-stack <[email protected]> | ||
LABEL maintainer="daos-stack <[email protected]>" | ||
|
||
# use same UID as host and default value of 1000 if not specified | ||
ARG UID=1000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# | ||
# Copyright 2018-2024 Intel Corporation | ||
# Copyright 2025 Hewlett Packard Enterprise Development LP | ||
# | ||
# 'recipe' for Docker to build an RPM | ||
# | ||
|
@@ -13,15 +14,15 @@ LABEL maintainer="[email protected]" | |
|
||
# Use local repo server if present | ||
ARG REPO_FILE_URL | ||
RUN if [ -n "$REPO_FILE_URL" ]; then \ | ||
cd /etc/yum.repos.d/ && \ | ||
curl -k -f -o daos_ci-fedora-artifactory.repo.tmp \ | ||
"$REPO_FILE_URL"daos_ci-fedora-artifactory.repo && \ | ||
for file in *.repo; do \ | ||
true > $file; \ | ||
done; \ | ||
mv daos_ci-fedora-artifactory.repo{.tmp,}; \ | ||
fi | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to install OS updates basic tools and daos dependencies | ||
# COPY ./utils/scripts/install-fedora.sh /tmp/install.sh | ||
# script to setup local repo if available | ||
COPY ./utils/scripts/helpers/repo-helper-fedora.sh /tmp/repo-helper.sh | ||
|
||
RUN chmod +x /tmp/repo-helper.sh && \ | ||
/tmp/repo-helper.sh && \ | ||
rm -f /tmp/repo-helper.sh | ||
|
||
# Install basic tools | ||
RUN dnf -y install mock make \ | ||
|
@@ -50,7 +51,7 @@ RUN dnf -y upgrade && \ | |
# RPM doesn't wipe out our patch | ||
# Ditto for the patch to zero and display ccache stats | ||
# https://github.com/rpm-software-management/mock/pull/1299 | ||
ARG PACKAGINGDIR=packaging | ||
ARG PACKAGINGDIR=./utils/rpms/packaging | ||
COPY ${PACKAGINGDIR}/*.patch ./ | ||
RUN (cd $(python3 -c 'import site; print(site.getsitepackages()[-1])') && \ | ||
if ! grep -e --ignore-unused-rpmlintrc rpmlint/cli.py; then \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,38 +4,24 @@ | |
# 'recipe' for Docker to build an Debian package | ||
# | ||
# Pull base image | ||
FROM ubuntu:20.04 | ||
ARG BASE_DISTRO=ubuntu:20.04 | ||
FROM $BASE_DISTRO | ||
Check warning Code scanning / Scorecard Pinned-Dependencies Medium
score is 2: containerImage not pinned by hash
Click Remediation section below to solve this issue |
||
LABEL org.opencontainers.image.authors="[email protected]" | ||
# Needed for later use of BASE_DISTRO | ||
ARG BASE_DISTRO | ||
|
||
ARG REPO_FILE_URL | ||
ARG DAOS_LAB_CA_FILE_URL | ||
# script to setup local repo if available | ||
COPY ./utils/scripts/helpers/repo-helper-ubuntu.sh /tmp/repo-helper.sh | ||
|
||
RUN chmod +x /tmp/repo-helper.sh && \ | ||
/tmp/repo-helper.sh \ | ||
rm -f /tmp/repo-helper.sh | ||
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
curl gpg | ||
|
||
ARG REPO_FILE_URL | ||
RUN if [ -n "$REPO_FILE_URL" ]; then \ | ||
cd /etc/apt/sources.list.d && \ | ||
curl -f -o daos_ci-ubuntu20.04-artifactory.list.tmp \ | ||
"$REPO_FILE_URL"daos_ci-ubuntu20.04-artifactory.list && \ | ||
true > ../sources.list && \ | ||
mv daos_ci-ubuntu20.04-artifactory.list.tmp \ | ||
daos_ci-ubuntu20.04-artifactory.list; \ | ||
url="${REPO_FILE_URL%/*/}/hpe-ilorest-ubuntu-bionic-proxy/"; \ | ||
else \ | ||
url="https://downloads.linux.hpe.com/SDR/repo/ilorest/"; \ | ||
fi; \ | ||
cd -; \ | ||
mkdir -p /usr/local/share/keyrings/; \ | ||
curl -f -O "$url"GPG-KEY-hprest; \ | ||
gpg --no-default-keyring --keyring ./temp-keyring.gpg \ | ||
--import GPG-KEY-hprest; \ | ||
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \ | ||
--output /usr/local/share/keyrings/hpe-sdr-public.gpg; \ | ||
rm ./temp-keyring.gpg; \ | ||
curl -f -O "$REPO_FILE_URL"esad_repo.key; \ | ||
gpg --no-default-keyring --keyring ./temp-keyring.gpg \ | ||
--import esad_repo.key; \ | ||
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export \ | ||
--output /usr/local/share/keyrings/daos-stack-public.gpg | ||
|
||
# Install basic tools | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
autoconf bash ca-certificates curl debhelper dh-make \ | ||
|
@@ -45,10 +31,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
cmake valgrind rpmdevtools | ||
|
||
# use same UID as host and default value of 1000 if not specified | ||
ARG UID=1000 | ||
ARG UID 1000 | ||
|
||
# Add build user (to keep chrootbuild happy) | ||
ENV USER build | ||
ENV USER=build | ||
RUN useradd -u $UID -ms /bin/bash $USER | ||
|
||
# need to run the build command as root, as it needs to chroot | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
# | ||
# Pull base image | ||
FROM ubuntu:rolling | ||
Maintainer daos-stack <[email protected]> | ||
LABEL maintainer="daos-stack <[email protected]>" | ||
|
||
# use same UID as host and default value of 1000 if not specified | ||
ARG UID=1000 | ||
|
Oops, something went wrong.