Commit ee84b49e authored by Federico Vaga's avatar Federico Vaga

bld: improve CI/CD

Use containers, and more building tests. Remove the koji and RPM
part (we will work on that again in the future but now it does not work anymore)
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 869e65b2
...@@ -3,20 +3,9 @@ ...@@ -3,20 +3,9 @@
# #
# SPDX-License-Identifier: CC0-1.0 # SPDX-License-Identifier: CC0-1.0
---
variables:
KOJI_TARGET: 'ohwr7'
KOJI_DISTTAG: '.el7.cern'
DIST_PATH: distribution
BUILD_PATH: distribution/build
stages: stages:
- static-analysis - static-analysis
- build - build
- dkms
- srpm
- kscratch
- kbuild
reuse: reuse:
stage: static-analysis stage: static-analysis
...@@ -28,47 +17,62 @@ reuse: ...@@ -28,47 +17,62 @@ reuse:
cppcheck: cppcheck:
stage: static-analysis stage: static-analysis
image:
name: gitlab-registry.cern.ch/coht/common-containers/static-analysis:latest
script: script:
- yum install -y cppcheck
- make -C software cppcheck - make -C software cppcheck
build: .script_fetch_kernel_dep: &script_fetch_kernel_dep
stage: build - git clone --depth 1 https://gitlab.cern.ch/coht/fmc.git ~/git/fmc
script: - export FMC=~/git/fmc
- yum install -y kernel-devel
- LINUX=/usr/src/kernels/*/ make -C software
build_dkms_rpm: .script_build_kernel_dep: &script_build_kernel_dep
stage: dkms - make -C $FMC/drivers/fmc all
script:
- yum install -y dkms
- make -C distribution dkms-rpm
build_srpm: build-centos-7:
stage: srpm stage: build
variables:
LINUX: /usr/src/kernels/*/
image:
name: gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest
before_script:
- *script_fetch_kernel_dep
- *script_build_kernel_dep
script: script:
- yum-builddep -y ${DIST_PATH}/*.spec - make -C software
- LINUX=/usr/src/kernels/*/ make -C distribution srpm
artifacts:
paths:
- distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
expire_in: 1 day
.koji_deps_template: &koji_deps .script_build_kernel_ver: &script_build_kernel_ver
before_script: - source /linux-versions.sh
- yum install -y koji krb5-workstation rpm-build - fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION)
- echo ${OHWR_PASSWORD} | kinit ${OHWR_USER} - *script_build_kernel_dep
- make -C software/kernel all
kscratch: build-kernel-5.4.129:
<<: *koji_deps stage: build
stage: kscratch allow_failure: true
variables:
VERSION: 5.4.129
image:
name: gitlab-registry.cern.ch/coht/common-containers/build-kernel:latest
before_script:
- *script_fetch_kernel_dep
script: script:
- koji --config=.koji build --wait --scratch ${KOJI_TARGET} distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm - *script_build_kernel_ver
kbuild-ohwr: .script_build_kernel_ver: &script_build_kernel_ver
<<: *koji_deps - source /linux-versions.sh
stage: kbuild - fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION)
only: - *script_build_kernel_dep
- tags - make -C software/kernel all
build-kernel-5.10.47:
stage: build
allow_failure: true
variables:
VERSION: 5.10.47
image:
name: gitlab-registry.cern.ch/coht/common-containers/build-kernel:latest
before_script:
- *script_fetch_kernel_dep
script: script:
- koji --config=.koji build --wait ${KOJI_TARGET} distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm - *script_build_kernel_ver
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment