redhat-cop / redhat-cop/openshift_virtualization_migration_ees

feat: parameterise hardcoded rhocp-4.21 repo name across all EE versions

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
1
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Problem

All three EE versions (2.4, 2.5, 2.6) hardcode --enablerepo=rhocp-4.21-for-rhel-9-*-rpms in both prepend_builder and prepend_final PKGMGR_OPTS:

- ENV PKGMGR_OPTS "--nodocs --setopt install_weak_deps=0 --enablerepo=rhocp-4.21-for-rhel-9-*-rpms"

When the OCP version needs to change, this requires manual edits in 6 places across 3 files simultaneously, creating drift risk and easy-to-miss mistakes.

Proposed Solution

Introduce a build-arg OCP_VERSION (defaulting to 4.21) and replace the hardcoded string:

prepend_builder:
  - ARG OCP_VERSION=4.21
  - ENV PKGMGR_OPTS "--nodocs --setopt install_weak_deps=0 --enablerepo=rhocp-${OCP_VERSION}-for-rhel-9-*-rpms"

Pass the arg from the CI workflow matrix to make the OCP dependency explicit and easily updated in one place.

Files to Change

  • openshift-virtualization-migration-ee-2.4/execution-environment.yml
  • openshift-virtualization-migration-ee-2.5/execution-environment.yml
  • openshift-virtualization-migration-ee-2.6/execution-environment.yml
  • .github/workflows/build-ee.yml (pass OCP_VERSION as a build-arg)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the three execution-environment.yml files and .github/workflows/build-ee.yml, then trace how the workflow matrix invokes the image builds. Done means OCP_VERSION is defined with the stated default in each EE definition, supplied by CI, and the six hardcoded repository references are replaced.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, github-actions
Domain
build-system, ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.