File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export AUTH_ENDPOINT="https://auth.stage.redhat.com/auth/realms/EmployeeIDP/prot
30
30
Product Mapping:
31
31
``` bash
32
32
export PRODDEFS_URL=" https://prodsec.pages.example.com/product-definitions/products.json"
33
+ export RHEL_RELEASE_GRAPH_URL=" https://gitlab.cee.example.com/api/v4/projects/prodsec%2Frhel-release-graph"
33
34
export SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt
34
35
```
35
36
Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ def __repr__(self) -> str:
39
39
class RHELReleaseData :
40
40
"""Parser and manager for RHEL release data from GitLab repository or local files."""
41
41
42
- # Default GitLab repository configuration
43
- DEFAULT_REPO_BASE = (
44
- "https://gitlab.cee.redhat.com/api/v4/projects/prodsec%2Frhel-release-graph"
42
+ # GitLab repository configuration (can be overridden with RHEL_RELEASE_GRAPH_URL env var)
43
+ RHEL_RELEASE_GRAPH_BASE = os .environ .get (
44
+ "RHEL_RELEASE_GRAPH_URL" ,
45
+ "https://gitlab.cee.redhat.com/api/v4/projects/prodsec%2Frhel-release-graph" ,
45
46
)
46
47
DEFAULT_FILE_PATH = "rhel9-releases.yml"
47
48
DEFAULT_BRANCH = "main"
@@ -117,9 +118,7 @@ def _fetch_from_gitlab(self) -> Optional[Dict[str, Any]]:
117
118
# Build GitLab API URL for the file
118
119
# URL format: /projects/:id/repository/files/:file_path/raw?ref=:branch
119
120
encoded_file_path = self .file_path .replace ("/" , "%2F" )
120
- file_url = (
121
- f"{ self .DEFAULT_REPO_BASE } /repository/files/{ encoded_file_path } /raw"
122
- )
121
+ file_url = f"{ self .RHEL_RELEASE_GRAPH_BASE } /repository/files/{ encoded_file_path } /raw"
123
122
124
123
# Load cached ETag if available
125
124
cached_etag = self ._load_cached_etag (etag_file )
You can’t perform that action at this time.
0 commit comments