From e103f4ed933f11f8e21676873331b3aaa57acce4 Mon Sep 17 00:00:00 2001 From: Leandro Mendes Date: Thu, 12 Sep 2024 15:37:06 +0200 Subject: [PATCH] feat(RELEASE-1102): remove unused data.fbc paremeters from the fbc tasks this commit removes references of unused or unecessary parameters in FBC Release Pipeline and tasks, namely: iibServiceConfigSecret, iibServiceAccountSecret and iibOverwriteFromIndexCredential. Signed-off-by: Leandro Mendes --- schema/dataKeys.json | 8 -------- tasks/add-fbc-contribution/README.md | 4 ++++ .../add-fbc-contribution.yaml | 11 +++-------- .../tests/test-add-fbc-contribution-hotfix.yaml | 15 --------------- .../test-add-fbc-contribution-ir-failure.yaml | 2 -- ...bc-contribution-pre-ga-and-hotfix-failure.yaml | 2 -- .../tests/test-add-fbc-contribution-pre-ga.yaml | 15 --------------- .../test-add-fbc-contribution-staged-index.yaml | 1 - .../tests/test-add-fbc-contribution-timeout.yaml | 2 -- .../tests/test-add-fbc-contribution.yaml | 15 --------------- 10 files changed, 7 insertions(+), 68 deletions(-) diff --git a/schema/dataKeys.json b/schema/dataKeys.json index 3d579b01b..6f90f544b 100644 --- a/schema/dataKeys.json +++ b/schema/dataKeys.json @@ -7,14 +7,6 @@ "type": "object", "additionalProperties": false, "properties": { - "iibOverwriteFromIndexCredential": { - "type": "string", - "description": "The credentials used to overwrite the existing index e.g. example-iib-overwrite-fromindex-credential" - }, - "iibServiceConfigSecret": { - "type": "string", - "description": "The secret containing the information required by the IIB service e.g. example-iib-service-config-secret" - }, "request": { "type": "string", "description": "The internal pipeline name to handle requests e.g. iib" diff --git a/tasks/add-fbc-contribution/README.md b/tasks/add-fbc-contribution/README.md index 0ba024e5e..5218a7d0b 100644 --- a/tasks/add-fbc-contribution/README.md +++ b/tasks/add-fbc-contribution/README.md @@ -14,6 +14,10 @@ Task to create a internalrequest to add fbc contributions to index images | targetIndex | targetIndex value updated by update-ocp-tag task | No | - | | resultsDirPath | Path to results directory in the data workspace | No | - | +## Changesin 3.3.2 +* Removed references to data parameters `iibServiceConfigSecret`, `iibServiceAccountSecret` and `iibOverwriteFromIndexCredential` as + they should not be changed by users. + ## Changes in 3.3.1 * Removed references of the redundant field `fbc.request` as FBC releases uses `iib` exclusively as its internal request pipeline diff --git a/tasks/add-fbc-contribution/add-fbc-contribution.yaml b/tasks/add-fbc-contribution/add-fbc-contribution.yaml index 44b43470d..d23daf8cc 100644 --- a/tasks/add-fbc-contribution/add-fbc-contribution.yaml +++ b/tasks/add-fbc-contribution/add-fbc-contribution.yaml @@ -4,7 +4,7 @@ kind: Task metadata: name: add-fbc-contribution labels: - app.kubernetes.io/version: "3.3.1" + app.kubernetes.io/version: "3.3.2" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -76,9 +76,6 @@ spec: default_build_timeout_seconds="1500" default_request_timeout_seconds="1500" - iib_overwrite_from_index_credential=$(jq -r \ - '.fbc.iibOverwriteFromIndexCredential // "iib-overwrite-fromimage-credentials"' "${DATA_FILE}") - iib_service_config_secret=$(jq -r '.fbc.iibServiceConfigSecret // "iib-services-config"' "${DATA_FILE}") build_tags=$(jq '.fbc.buildTags // []' "${DATA_FILE}") add_arches=$(jq '.fbc.addArches // []' "${DATA_FILE}") hotfix=$(jq -r '.fbc.hotfix // "false"' "${DATA_FILE}") @@ -93,9 +90,9 @@ spec: fbc_fragment=$(jq -cr '.components[0].containerImage' "${SNAPSHOT_PATH}") if [ "${staged_index}" = "true" ]; then - iib_service_account_secret=iib-service-account-stage + iib_service_account_secret="iib-service-account-stage" else - iib_service_account_secret=iib-service-account-prod + iib_service_account_secret="iib-service-account-prod" fi timestamp_format=$(jq -r '.fbc.timestampFormat // "%s"' "${DATA_FILE}") @@ -142,9 +139,7 @@ spec: -p fromIndex="$(params.fromIndex)" \ -p targetIndex="${target_index}" \ -p fbcFragment="${fbc_fragment}" \ - -p iibServiceConfigSecret="${iib_service_config_secret}" \ -p iibServiceAccountSecret="${iib_service_account_secret}" \ - -p iibOverwriteFromIndexCredential="${iib_overwrite_from_index_credential}" \ -p buildTimeoutSeconds="${build_timeout_seconds}" \ -p buildTags="${build_tags}" \ -p addArches="${add_arches}" \ diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-hotfix.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-hotfix.yaml index 8f1d1ceb6..a34c8d608 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-hotfix.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-hotfix.yaml @@ -39,8 +39,6 @@ spec: cat > "$(workspaces.data.path)/data.json" << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", - "iibOverwriteFromIndexCredential": "test-iib-overwrite-fromindex-credential", "fbcPublishingCredentials": "test-fbc-publishing-credentials", "hotfix": true, "issueId": "bz123456", @@ -90,19 +88,6 @@ spec: internalRequest=$(echo "${internalRequest}" | xargs) requestParams=$(kubectl get internalrequest "${internalRequest}" -o jsonpath="{.spec.params}") - if [ "$(jq -r '.iibServiceConfigSecret' <<< "${requestParams}")" != "test-iib-service-config-secret" ]; - then - echo "iibServiceConfigSecret does not match" - exit 1 - fi - - value=$(jq -r '.iibOverwriteFromIndexCredential' <<< "${requestParams}") - if [ "${value}" != "test-iib-overwrite-fromindex-credential" ] - then - echo "iibOverwriteFromIndexCredential does not match" - exit 1 - fi - if [ "$(jq -r '.fromIndex' <<< "${requestParams}")" != "quay.io/scoheb/fbc-index-testing:latest" ]; then echo "fromIndex does not match" exit 1 diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-ir-failure.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-ir-failure.yaml index 9018eed79..ac0048ca0 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-ir-failure.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-ir-failure.yaml @@ -43,8 +43,6 @@ spec: cat > $(workspaces.data.path)/data.json << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", - "iibOverwriteFromIndexCredential": "test-iib-overwrite-fromindex-credential", "fbcPublishingCredentials": "test-fbc-publishing-credentials", "buildTimeoutSeconds": 420, "requestTimeoutSeconds": 120 diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga-and-hotfix-failure.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga-and-hotfix-failure.yaml index f53130bc0..120b52887 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga-and-hotfix-failure.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga-and-hotfix-failure.yaml @@ -42,8 +42,6 @@ spec: cat > "$(workspaces.data.path)/data.json" << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", - "iibOverwriteFromIndexCredential": "test-iib-overwrite-fromindex-credential", "fbcPublishingCredentials": "test-fbc-publishing-credentials", "preGA": "true", "hotfix": "true", diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga.yaml index 184c52eeb..fb8912cdd 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-pre-ga.yaml @@ -40,8 +40,6 @@ spec: cat > "$(workspaces.data.path)/data.json" << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", - "iibOverwriteFromIndexCredential": "test-iib-overwrite-fromindex-credential", "fbcPublishingCredentials": "test-fbc-publishing-credentials", "preGA": "true", "productName": "pre-ga-product", @@ -92,19 +90,6 @@ spec: internalRequest=$(echo "${internalRequest}" | xargs) requestParams=$(kubectl get internalrequest "${internalRequest}" -o jsonpath="{.spec.params}") - if [ "$(jq -r '.iibServiceConfigSecret' <<< "${requestParams}")" != "test-iib-service-config-secret" ]; - then - echo "iibServiceConfigSecret does not match" - exit 1 - fi - - value=$(jq -r '.iibOverwriteFromIndexCredential' <<< "${requestParams}") - if [ "${value}" != "test-iib-overwrite-fromindex-credential" ] - then - echo "iibOverwriteFromIndexCredential does not match" - exit 1 - fi - if [ "$(jq -r '.fromIndex' <<< "${requestParams}")" != "quay.io/scoheb/fbc-index-testing:latest" ]; then echo "fromIndex does not match" exit 1 diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-staged-index.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-staged-index.yaml index cb5d736f5..e84506d30 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-staged-index.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-staged-index.yaml @@ -39,7 +39,6 @@ spec: cat > "$(workspaces.data.path)/data.json" << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", "stagedIndex": true, "buildTimeoutSeconds": 420 } diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-timeout.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-timeout.yaml index fcf5ba8b7..03ccaa2e3 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-timeout.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution-timeout.yaml @@ -39,8 +39,6 @@ spec: cat > "$(workspaces.data.path)/data.json" << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", - "iibOverwriteFromIndexCredential": "test-iib-overwrite-fromindex-credential", "fbcPublishingCredentials": "test-fbc-publishing-credentials", "buildTimeoutSeconds": 1, "requestTimeoutSeconds": 1 diff --git a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution.yaml b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution.yaml index c5600b5c7..7c15ff1ba 100644 --- a/tasks/add-fbc-contribution/tests/test-add-fbc-contribution.yaml +++ b/tasks/add-fbc-contribution/tests/test-add-fbc-contribution.yaml @@ -39,8 +39,6 @@ spec: cat > "$(workspaces.data.path)/data.json" << EOF { "fbc": { - "iibServiceConfigSecret": "test-iib-service-config-secret", - "iibOverwriteFromIndexCredential": "test-iib-overwrite-fromindex-credential", "fbcPublishingCredentials": "test-fbc-publishing-credentials", "buildTimeoutSeconds": 420, "requestTimeoutSeconds": 120 @@ -101,19 +99,6 @@ spec: internalRequest=$(echo "${internalRequest}" | xargs) requestParams=$(kubectl get internalrequest "${internalRequest}" -o jsonpath="{.spec.params}") - if [ "$(jq -r '.iibServiceConfigSecret' <<< "${requestParams}")" != "test-iib-service-config-secret" ]; - then - echo "iibServiceConfigSecret does not match" - exit 1 - fi - - value=$(jq -r '.iibOverwriteFromIndexCredential' <<< "${requestParams}") - if [ "${value}" != "test-iib-overwrite-fromindex-credential" ] - then - echo "iibOverwriteFromIndexCredential does not match" - exit 1 - fi - test "$(jq -r '.index_image.target_index' \ "$(workspaces.data.path)"/results/add-fbc-contribution-results.json)" == \ "quay.io/scoheb/fbc-target-index-testing:v4.12"