Skip to content
Snippets Groups Projects
Unverified Commit 4c12628a authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[scripts][build] Check for yum presence rather than rely on CI tags

From the looks of it, the CI_RUNNER_TAGS format may have changed to be
'["tag1", "tag2"]' so doing the actual check will not work.

Hence rather than relying on this environment variable content and format, check
whether yum is present on the runner and use it if so.
parent 5ef7675b
Branches
Tags
1 merge request!338Check for yum presence rather than rely on CI tags
Pipeline #68098 passed
...@@ -247,11 +247,12 @@ def build( ...@@ -247,11 +247,12 @@ def build(
if not os.path.exists(d): if not os.path.exists(d):
raise RuntimeError("The directory %s does not exist" % d) raise RuntimeError("The directory %s does not exist" % d)
# If in docker, install the packages inside the yum_requirements.txt file if it exists # If using RH based image/runner, install the packages inside the
# yum_requirements.txt file if it exists
yum_requirements_file = os.path.join(d, "yum_requirements.txt") yum_requirements_file = os.path.join(d, "yum_requirements.txt")
if "docker" in os.environ.get("CI_RUNNER_TAGS", "").split( if os.path.exists("/usr/bin/yum") and os.path.exists(
", " yum_requirements_file
) and os.path.exists(yum_requirements_file): ):
logger.info( logger.info(
"Installing packages from yum_requirements.txt file using yum" "Installing packages from yum_requirements.txt file using yum"
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment