Skip to content

Commit

Permalink
feat(RELEASE-1102): remove unused data.fbc paremeters from the fbc tasks
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
theflockers committed Sep 13, 2024
1 parent 9a9b19d commit e103f4e
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 68 deletions.
8 changes: 0 additions & 8 deletions schema/dataKeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions tasks/add-fbc-contribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 3 additions & 8 deletions tasks/add-fbc-contribution/add-fbc-contribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}")
Expand All @@ -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}")
Expand Down Expand Up @@ -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}" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ spec:
cat > "$(workspaces.data.path)/data.json" << EOF
{
"fbc": {
"iibServiceConfigSecret": "test-iib-service-config-secret",
"stagedIndex": true,
"buildTimeoutSeconds": 420
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 0 additions & 15 deletions tasks/add-fbc-contribution/tests/test-add-fbc-contribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit e103f4e

Please sign in to comment.