Skip to content


Configure an end-to-end RPM build-and-test workflow for this project.


This component automatically configures a workflow to

  • build one-or-more binary RPMs
  • install and test the new binary packages


  - component:<VERSION>


Input Default value Description
cache_dir ".cache/rpm" The path to cache downloaded RPMs to (relative to $CI_PROJECT_DIR)
disable_repos "" Space-separate list of RPM repo names to disable
dnf_update true Update all installed packages with dnf update before proceeeding
enable_repos "" Space-separate list of RPM repo names to enable
epel false Pre-configure the EPEL (Extra Packages for Enterprise Linux) repository
job_prefix "redhat" Prefix to apply to all job names
needs List of jobs whose artifacts are required to create the source RPM (e.g. the job that created the project source distribution)"
redhat_versions [8] Set of RedHat versions to build/test
rpmbuild_options "" Options to pass to rpmbuild
rpmlint_options "" Options to pass to rpmlint
source_distribution_name "*.tar.*" Name of the source distribution file
test_install "" Extra packages to install to support the test_script
test_script Script commands to run as part of the redhat test jobs


Requires an upstream source distribution

Creating RPM packages is only supported when starting from an upstream tarball that contains a .spec file.

This must be configured independently of this component and the tarball provided to the redhat/all component via the needs input. See Examples for an example.


Build and test a Python project

Build and test a Python application on RedHat

  - component:
      stage: source
  - component:<VERSION>
      needs: [sdist]
      test_install: python3-pytest
        - python3 -m pytest --pyargs my_library.tests