Skip to content

Commit ad42330

Browse files
committed
SRE-3205 ci: fixes for Fedora 42
- redhat-lsb-core no longer supported by Fedora 42 - Fedora 41 and 42 are not available in archive repo, archive repo is only for EOL releases - new test to verify that packaging works for all supported version of Fedore: latest (default), 41, 42 Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
1 parent 506055b commit ad42330

File tree

3 files changed

+62
-9
lines changed

3 files changed

+62
-9
lines changed

Dockerfile.mockbuild

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ RUN chmod +x /tmp/repo-helper.sh && \
2626
rm -f /tmp/repo-helper.sh
2727

2828
# Install basic tools
29-
RUN dnf -y install mock make \
30-
rpm-build createrepo rpmlint redhat-lsb-core git \
31-
python-srpm-macros rpmdevtools && \
29+
RUN dnf -y install mock make \
30+
rpm-build createrepo rpmlint git \
31+
python-srpm-macros rpmdevtools && \
3232
dnf -y clean all
3333

3434
# use same UID as host and default value of 1000 if not specified

Jenkinsfile

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,56 @@ pipeline {
157157
archiveArtifacts artifacts: 'libfabric/artifacts/el9/**'
158158
}
159159
}
160-
} //stage('Build libfabric on EL 9')
160+
} //stage('Build libfabric on EL 9 (Fedora 42)')
161+
stage('Build libfabric on EL 9') {
162+
agent {
163+
dockerfile {
164+
filename 'Dockerfile.mockbuild'
165+
label 'docker_runner'
166+
args '--group-add mock' +
167+
' --cap-add=SYS_ADMIN' +
168+
' --privileged=true' +
169+
' -v /scratch:/scratch'
170+
additionalBuildArgs dockerBuildArgs() +
171+
'--build-arg FVERSION=42 --build-arg PACKAGINGDIR=. '
172+
}
173+
}
174+
steps {
175+
checkoutScm url: 'https://github.com/daos-stack/libfabric.git',
176+
checkoutDir: "libfabric",
177+
branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master')
178+
sh label: env.STAGE_NAME,
179+
script: updatePackaging('libfabric') + '''
180+
rm -rf artifacts/el9/
181+
mkdir -p artifacts/el9/
182+
make CHROOT_NAME="rocky+epel-9-x86_64" DISTRO_VERSION=9 chrootbuild'''
183+
}
184+
post {
185+
success {
186+
sh 'ls -l /var/lib/mock/rocky+epel-9-x86_64/result/'
187+
}
188+
unsuccessful {
189+
sh label: "Collect artifacts",
190+
script: '''mockroot=/var/lib/mock/rocky+epel-9-x86_64
191+
artdir=$PWD/libfabric/artifacts/el9
192+
cp -af _topdir/SRPMS $artdir
193+
(cd $mockroot/result/ &&
194+
cp -r . $artdir)
195+
(if cd $mockroot/root/builddir/build/BUILD/*/; then
196+
find . -name configure -printf %h\\\\n | \
197+
while read dir; do
198+
if [ ! -f $dir/config.log ]; then
199+
continue
200+
fi
201+
tdir="$artdir/autoconf-logs/$dir"
202+
mkdir -p $tdir
203+
cp -a $dir/config.log $tdir/
204+
done
205+
fi)'''
206+
archiveArtifacts artifacts: 'libfabric/artifacts/el9/**'
207+
}
208+
}
209+
} //stage('Build libfabric on EL 9 (Fedora 42)')
161210
stage('Build mercury on EL 8') {
162211
agent {
163212
dockerfile {
@@ -206,7 +255,7 @@ pipeline {
206255
}
207256
}
208257
} //stage('Build mercury on EL 8')
209-
stage('Build libfabric on Leap 15') {
258+
stage('Build libfabric on Leap 15 (Fedora 41)') {
210259
agent {
211260
dockerfile {
212261
filename 'Dockerfile.mockbuild'
@@ -216,7 +265,7 @@ pipeline {
216265
' --privileged=true' +
217266
' -v /scratch:/scratch'
218267
additionalBuildArgs dockerBuildArgs() +
219-
'--build-arg FVERSION=37 --build-arg PACKAGINGDIR=. '
268+
'--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. '
220269
}
221270
}
222271
steps {
@@ -254,7 +303,7 @@ pipeline {
254303
archiveArtifacts artifacts: 'libfabric/artifacts/leap15/**'
255304
}
256305
}
257-
} //stage('Build libfabric on Leap 15')
306+
} //stage('Build libfabric on Leap 15 (Fedora 41)')
258307
stage('Build libfabric on Ubuntu 20.04') {
259308
agent {
260309
dockerfile {

scripts/repo-helper-fedora.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ set -uex
1010
: "${REPOSITORY_NAME:=artifactory}"
1111
: "${archive:=}"
1212
if [ "$FVERSION" != "latest" ]; then
13-
archive="-archive"
13+
if [ "$FVERSION" != "42" ]; then
14+
if [ "$FVERSION" != "41" ]; then
15+
archive="-archive"
16+
fi
17+
fi
1418
fi
1519

1620
# shellcheck disable=SC2120
@@ -62,7 +66,7 @@ if [ -n "$REPO_FILE_URL" ]; then
6266
pushd /etc/yum.repos.d/
6367
curl -k --noproxy '*' -sSf \
6468
-o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \
65-
"{$REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo"
69+
"${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo"
6670
disable_repos /etc/yum.repos.d/
6771
popd
6872
fi

0 commit comments

Comments
 (0)