Skip to content

Commit

Permalink
Merge pull request #44 from rbikar/add-override-final-relver
Browse files Browse the repository at this point in the history
Added mapping for final releasever override [RHELDST-19153]
  • Loading branch information
rbikar authored Sep 15, 2023
2 parents ef2a624 + 2a3e2a3 commit f8c6a6a
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/cdn_definitions/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"src": "/origin/rpm"
}
],
"override_final_rhel_release": {
"cs_label_example": "0.0"
},
"override_initial_rhel_release": {
"0": "0.0"
},
Expand Down Expand Up @@ -77,26 +80,26 @@
"repo_overrides": {
"prod": [
{
"key": "example",
"if_match_path": "/content/dist/rhel9/",
"key": "example",
"value": true
},
{
"key": "example",
"if_created_after": "2023-06-01T14:00:00Z",
"if_match_id": "rhel-8",
"key": "example",
"value": true
}
],
"stage": [
{
"key": "example",
"if_match_id": ".",
"key": "example",
"value": true
},
{
"key": "example",
"if_match_id": "e2e.*rhel-8",
"key": "example",
"value": false
}
]
Expand Down
4 changes: 4 additions & 0 deletions src/cdn_definitions/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ tps_variant_mappings:
override_initial_rhel_release:
"0": "0.0"

# Workaround used to override the final RHEL version for given content set
override_final_rhel_release:
"cs_label_example": "0.0"

# Maps an architecture to RHEL versions that do not include said architecture.
filter_arches_from_release:
"0":
Expand Down
27 changes: 23 additions & 4 deletions src/cdn_definitions/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@
},
"type": "object"
},
"content_set_label": {
"pattern": "^[A-Za-z0-9_\\-]{1,200}$",
"type": "string"
},
"content_set_to_release_version_mapping": {
"additionalProperties": false,
"patternProperties": {
".*": {
"$ref": "#/definitions/release_version"
}
},
"propertyNames": {
"$ref": "#/definitions/content_set_label"
},
"type": "object"
},
"current_latest_rhel_versions": {
"additionalProperties": false,
"patternProperties": {
Expand Down Expand Up @@ -221,10 +237,6 @@
}
],
"properties": {
"key": {
"minLength": 1,
"type": "string"
},
"if_created_after": {
"$ref": "#/definitions/iso8601_datetime"
},
Expand All @@ -237,6 +249,10 @@
"if_match_path": {
"$ref": "#/definitions/absolute_path"
},
"key": {
"minLength": 1,
"type": "string"
},
"value": {
"type": [
"string",
Expand Down Expand Up @@ -349,6 +365,9 @@
"origin_alias": {
"$ref": "#/definitions/path_alias_list"
},
"override_final_rhel_release": {
"$ref": "#/definitions/content_set_to_release_version_mapping"
},
"override_initial_rhel_release": {
"$ref": "#/definitions/major_to_release_version_mapping"
},
Expand Down
16 changes: 16 additions & 0 deletions src/cdn_definitions/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ definitions:
type: string
pattern: "^[0-9]+$"

content_set_label:
type: string
pattern: "^[A-Za-z0-9_\\-]{1,200}$"

product_id_list:
type: array
items:
Expand Down Expand Up @@ -86,6 +90,15 @@ definitions:
$ref: "#/definitions/release_version"
additionalProperties: false

content_set_to_release_version_mapping:
type: object
propertyNames:
$ref: "#/definitions/content_set_label"
patternProperties:
".*":
$ref: "#/definitions/release_version"
additionalProperties: false

release_stream_mapping:
type: object
patternProperties:
Expand Down Expand Up @@ -291,6 +304,9 @@ properties:
override_initial_rhel_release:
$ref: "#/definitions/major_to_release_version_mapping"

override_final_rhel_release:
$ref: "#/definitions/content_set_to_release_version_mapping"

filter_arches_from_release:
$ref: "#/definitions/version_to_arch_list_mapping"

Expand Down

0 comments on commit f8c6a6a

Please sign in to comment.