diff --git a/pipelines/fbc-release/README.md b/pipelines/fbc-release/README.md index 5f3e1eaf0..6f36920e9 100644 --- a/pipelines/fbc-release/README.md +++ b/pipelines/fbc-release/README.md @@ -19,6 +19,9 @@ Tekton release pipeline to interact with FBC Pipeline | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 4.1.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 4.0.3 * The `sign-index-image` task now receives new mandatory parameters `taskGitUrl` and `taskGitRevision diff --git a/pipelines/fbc-release/fbc-release.yaml b/pipelines/fbc-release/fbc-release.yaml index 3c0629493..3cd188434 100644 --- a/pipelines/fbc-release/fbc-release.yaml +++ b/pipelines/fbc-release/fbc-release.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: fbc-release labels: - app.kubernetes.io/version: "4.0.3" + app.kubernetes.io/version: "4.1.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -122,6 +122,30 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - fbc + - sign + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: validate-single-component taskRef: resolver: "git" diff --git a/pipelines/push-binaries-to-dev-portal/README.md b/pipelines/push-binaries-to-dev-portal/README.md index 23d1ae69c..cfab3eabc 100644 --- a/pipelines/push-binaries-to-dev-portal/README.md +++ b/pipelines/push-binaries-to-dev-portal/README.md @@ -19,6 +19,9 @@ Tekton pipeline to sign and release Red Hat binaries to the Red Hat Developer Po | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 1.5.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 1.4.0 * Use results from `sign-binaries` task for `push-to-cdn` and `publish-to-cgw` instead of `extract-binaries-from-image` diff --git a/pipelines/push-binaries-to-dev-portal/push-binaries-to-dev-portal.yaml b/pipelines/push-binaries-to-dev-portal/push-binaries-to-dev-portal.yaml index b177491ec..44122d549 100644 --- a/pipelines/push-binaries-to-dev-portal/push-binaries-to-dev-portal.yaml +++ b/pipelines/push-binaries-to-dev-portal/push-binaries-to-dev-portal.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: push-binaries-to-dev-portal labels: - app.kubernetes.io/version: "1.4.0" + app.kubernetes.io/version: "1.5.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -109,6 +109,30 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - cdn + - contentGateway + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: reduce-snapshot taskRef: resolver: "git" diff --git a/pipelines/push-disk-images-to-cdn/README.md b/pipelines/push-disk-images-to-cdn/README.md index 0a6b0fa55..0be0af5b1 100644 --- a/pipelines/push-disk-images-to-cdn/README.md +++ b/pipelines/push-disk-images-to-cdn/README.md @@ -20,6 +20,9 @@ Tekton Pipeline to push disk images to a cdn using pulp | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 1.2.1 +* add new parameter `schema` to the `check-data-keys` task. + ## Changes in 1.2.0 * The `push-disk-images` task now gets the `resultsDir` parameter from `collect-data` results * Add the task `update-cr-status` at the end of the pipeline to save all pipeline results diff --git a/pipelines/push-disk-images-to-cdn/push-disk-images-to-cdn.yaml b/pipelines/push-disk-images-to-cdn/push-disk-images-to-cdn.yaml index 900401d79..b17f9287f 100644 --- a/pipelines/push-disk-images-to-cdn/push-disk-images-to-cdn.yaml +++ b/pipelines/push-disk-images-to-cdn/push-disk-images-to-cdn.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: push-disk-images-to-cdn labels: - app.kubernetes.io/version: "1.2.0" + app.kubernetes.io/version: "1.2.1" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -191,6 +191,8 @@ spec: params: - name: dataPath value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json - name: systems value: - cdn diff --git a/pipelines/push-to-addons-registry/README.md b/pipelines/push-to-addons-registry/README.md index b102a74de..a47d1e22c 100644 --- a/pipelines/push-to-addons-registry/README.md +++ b/pipelines/push-to-addons-registry/README.md @@ -19,5 +19,8 @@ Tekton pipeline to release a single FBC component to the Addons Registry. | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 0.1.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 0.0.1 * Initially forked from push-to-external-registry v5.2.1 diff --git a/pipelines/push-to-addons-registry/push-to-addons-registry.yaml b/pipelines/push-to-addons-registry/push-to-addons-registry.yaml index bbfb0c28b..e926b46e9 100644 --- a/pipelines/push-to-addons-registry/push-to-addons-registry.yaml +++ b/pipelines/push-to-addons-registry/push-to-addons-registry.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: push-to-addons-registry labels: - app.kubernetes.io/version: "0.0.1" + app.kubernetes.io/version: "0.1.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -109,6 +109,29 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - mapping + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: reduce-snapshot taskRef: resolver: "git" diff --git a/pipelines/push-to-external-registry/README.md b/pipelines/push-to-external-registry/README.md index 4fafc3b6f..3fcf5314a 100644 --- a/pipelines/push-to-external-registry/README.md +++ b/pipelines/push-to-external-registry/README.md @@ -19,6 +19,9 @@ Tekton pipeline to release Snapshots to an external registry. | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 5.3.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 5.2.1 * Add retries for some tasks diff --git a/pipelines/push-to-external-registry/push-to-external-registry.yaml b/pipelines/push-to-external-registry/push-to-external-registry.yaml index 913764418..eccfef6c7 100644 --- a/pipelines/push-to-external-registry/push-to-external-registry.yaml +++ b/pipelines/push-to-external-registry/push-to-external-registry.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: push-to-external-registry labels: - app.kubernetes.io/version: "5.2.1" + app.kubernetes.io/version: "5.3.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -109,6 +109,29 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - mapping + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: reduce-snapshot taskRef: resolver: "git" diff --git a/pipelines/release-to-github/README.md b/pipelines/release-to-github/README.md index 7744b4f2b..48e962e6d 100644 --- a/pipelines/release-to-github/README.md +++ b/pipelines/release-to-github/README.md @@ -19,6 +19,9 @@ Tekton release pipeline to release binaries extracted from the image built with | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 4.1.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 4.0.0 * Drop the `enterpriseContractPublicKey` param. The verify task will take the value from the policy. diff --git a/pipelines/release-to-github/release-to-github.yaml b/pipelines/release-to-github/release-to-github.yaml index a264bd567..d905614fd 100644 --- a/pipelines/release-to-github/release-to-github.yaml +++ b/pipelines/release-to-github/release-to-github.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: release-to-github labels: - app.kubernetes.io/version: "4.0.0" + app.kubernetes.io/version: "4.1.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -110,6 +110,30 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - github + - sign + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: validate-single-component taskRef: resolver: "git" diff --git a/pipelines/release-to-mrrc/README.md b/pipelines/release-to-mrrc/README.md index fc49c5e00..ce2543f3e 100644 --- a/pipelines/release-to-mrrc/README.md +++ b/pipelines/release-to-mrrc/README.md @@ -18,3 +18,6 @@ Tekton release pipeline to release maven artifacts extracted from the maven repo | verify_ec_task_bundle | The location of the bundle containing the verify-enterprise-contract task | No | - | | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | Yes | production | + +## Changes in 0.2.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. diff --git a/pipelines/release-to-mrrc/release-to-mrrc.yaml b/pipelines/release-to-mrrc/release-to-mrrc.yaml index 1a1d5eed5..11741a2b2 100644 --- a/pipelines/release-to-mrrc/release-to-mrrc.yaml +++ b/pipelines/release-to-mrrc/release-to-mrrc.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: release-to-mrrc labels: - app.kubernetes.io/version: "0.1.0" + app.kubernetes.io/version: "0.2.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -107,6 +107,29 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - mrrc + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: verify-enterprise-contract taskRef: resolver: "bundles" diff --git a/pipelines/rh-advisories/README.md b/pipelines/rh-advisories/README.md index 58d707ab8..45df215c7 100644 --- a/pipelines/rh-advisories/README.md +++ b/pipelines/rh-advisories/README.md @@ -23,6 +23,9 @@ the rh-push-to-registry-redhat-io pipeline. | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 1.5.7 +* add new parameter `schema` to the `check-data-keys` task. + ## Changes in 1.5.6 * new mandatory parameter resultsDirPath added to run-file-updates task diff --git a/pipelines/rh-advisories/rh-advisories.yaml b/pipelines/rh-advisories/rh-advisories.yaml index d363de12d..869525859 100644 --- a/pipelines/rh-advisories/rh-advisories.yaml +++ b/pipelines/rh-advisories/rh-advisories.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: rh-advisories labels: - app.kubernetes.io/version: "1.5.6" + app.kubernetes.io/version: "1.5.7" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -509,6 +509,8 @@ spec: params: - name: dataPath value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json - name: systems value: - releaseNotes diff --git a/pipelines/rh-push-to-external-registry/README.md b/pipelines/rh-push-to-external-registry/README.md index 79c734f2d..02943134b 100644 --- a/pipelines/rh-push-to-external-registry/README.md +++ b/pipelines/rh-push-to-external-registry/README.md @@ -19,6 +19,9 @@ Tekton pipeline to release Red Hat Snapshots to an external registry. This pipel | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 5.4.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 5.3.2 * new mandatory parameter resultsDirPath added to run-file-updates task diff --git a/pipelines/rh-push-to-external-registry/rh-push-to-external-registry.yaml b/pipelines/rh-push-to-external-registry/rh-push-to-external-registry.yaml index 0818765a9..6a8c27f1a 100644 --- a/pipelines/rh-push-to-external-registry/rh-push-to-external-registry.yaml +++ b/pipelines/rh-push-to-external-registry/rh-push-to-external-registry.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: rh-push-to-external-registry labels: - app.kubernetes.io/version: "5.3.2" + app.kubernetes.io/version: "5.4.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -109,6 +109,30 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - pyxis + - mapping + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: reduce-snapshot taskRef: resolver: "git" diff --git a/pipelines/rh-push-to-registry-redhat-io/README.md b/pipelines/rh-push-to-registry-redhat-io/README.md index fdf4deb98..a3588f788 100644 --- a/pipelines/rh-push-to-registry-redhat-io/README.md +++ b/pipelines/rh-push-to-registry-redhat-io/README.md @@ -19,6 +19,8 @@ Tekton pipeline to release content to registry.redhat.io registry. | verify_ec_task_bundle | The location of the bundle containing the verify-enterprise-contract task | No | - | | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 4.6.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. ## Changes in 4.5.5 * new mandatory parameter resultsDirPath added to run-file-updates task diff --git a/pipelines/rh-push-to-registry-redhat-io/rh-push-to-registry-redhat-io.yaml b/pipelines/rh-push-to-registry-redhat-io/rh-push-to-registry-redhat-io.yaml index 5d5572439..48873e675 100644 --- a/pipelines/rh-push-to-registry-redhat-io/rh-push-to-registry-redhat-io.yaml +++ b/pipelines/rh-push-to-registry-redhat-io/rh-push-to-registry-redhat-io.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: rh-push-to-registry-redhat-io labels: - app.kubernetes.io/version: "4.5.5" + app.kubernetes.io/version: "4.6.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -113,6 +113,32 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - pyxis + - mapping + - sign + - cosignSecretName + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: reduce-snapshot taskRef: resolver: "git" diff --git a/pipelines/rhtap-service-push/README.md b/pipelines/rhtap-service-push/README.md index f9cc93659..01cbcf04f 100644 --- a/pipelines/rhtap-service-push/README.md +++ b/pipelines/rhtap-service-push/README.md @@ -21,6 +21,9 @@ | taskGitUrl | The url to the git repo where the release-service-catalog tasks to be used are stored | Yes | https://github.com/konflux-ci/release-service-catalog.git | | taskGitRevision | The revision in the taskGitUrl repo to be used | No | - | +## Changes in 4.3.0 +* Implement the `check-data-keys` task to validate the `data.json` file using the JSON schema. + ## Changes in 4.2.0 * Add new reduce-snapshot task diff --git a/pipelines/rhtap-service-push/rhtap-service-push.yaml b/pipelines/rhtap-service-push/rhtap-service-push.yaml index 4ad4a1cdc..7f3840f69 100644 --- a/pipelines/rhtap-service-push/rhtap-service-push.yaml +++ b/pipelines/rhtap-service-push/rhtap-service-push.yaml @@ -4,7 +4,7 @@ kind: Pipeline metadata: name: rhtap-service-push labels: - app.kubernetes.io/version: "4.2.0" + app.kubernetes.io/version: "4.3.0" annotations: tekton.dev/pipelines.minVersion: "0.12.1" tekton.dev/tags: release @@ -109,6 +109,31 @@ spec: workspace: release-workspace runAfter: - verify-access-to-resources + - name: check-data-keys + params: + - name: dataPath + value: "$(tasks.collect-data.results.data)" + - name: schema + value: $(params.taskGitUrl)/raw/$(params.taskGitRevision)/schema/dataKeys.json + - name: systems + value: + - mapping + - pyxis + - sign + taskRef: + params: + - name: url + value: $(params.taskGitUrl) + - name: revision + value: $(params.taskGitRevision) + - name: pathInRepo + value: tasks/check-data-keys/check-data-keys.yaml + resolver: git + workspaces: + - name: data + workspace: release-workspace + runAfter: + - collect-data - name: reduce-snapshot taskRef: resolver: "git" diff --git a/schema/dataKeys.json b/schema/dataKeys.json index 892585352..c4e22b3f6 100644 --- a/schema/dataKeys.json +++ b/schema/dataKeys.json @@ -6,7 +6,18 @@ "type": "array", "items": { "type": "string", - "enum": ["releaseNotes", "cdn"], + "enum": [ + "releaseNotes", + "cdn", + "fbc", + "sign", + "mrrc", + "github", + "contentGateway", + "pyxis", + "mapping", + "cosignSecretName" + ], "description": "List of systems that are supported to be required in the data" } }, @@ -49,8 +60,7 @@ }, "productName": { "type": "string", - "description": "The product name e.g. exampleproduct ", - "pattern": "^[a-z]+$" + "description": "The product name e.g. exampleproduct " }, "productVersion": { "type": "string", @@ -422,7 +432,6 @@ "type": "array", "items": { "type": "object", - "additionalProperties": false, "properties": { "name": { "type": "string", @@ -520,9 +529,7 @@ } }, "then": { - "required": [ - "releaseNotes" - ], + "required": ["releaseNotes"], "properties": { "releaseNotes": { "required": [ @@ -540,9 +547,7 @@ ], "properties": { "content": { - "required": [ - "images" - ] + "required": ["images"] } } } @@ -560,17 +565,205 @@ } }, "then": { - "required": [ - "cdn" - ], + "required": ["cdn"], "properties": { "cdn": { + "required": ["env"] + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "fbc" + } + } + } + }, + "then": { + "required": ["fbc"], + "properties": { + "fbc": { "required": [ - "env" + "allowedPackages", + "fromIndex", + "targetIndex", + "publishingCredentials", + "buildTimeoutSeconds", + "issueId", + "preGA", + "productName", + "productVersion" ] } } } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "sign" + } + } + } + }, + "then": { + "required": ["sign"], + "properties": { + "sign": { + "required": ["configMapName"] + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "cosignSecretName" + } + } + } + }, + "then": { + "required": ["sign"], + "properties": { + "sign": { + "required": ["cosignSecretName"] + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "mrrc" + } + } + } + }, + "then": { + "required": ["mrrc"], + "properties": { + "mrrc": { + "required": ["environment", "release", "awsSecret", "charonConfig"] + }, + "releaseNotes": { + "required": ["product_name", "product_version"] + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "github" + } + } + } + }, + "then": { + "required": ["github"], + "properties": { + "github": { + "required": ["githubSecret"] + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "contentGateway" + } + } + } + }, + "then": { + "properties": { + "mapping": { + "properties": { + "components": { + "items": { + "properties": { + "contentGateway": { + "required": [ + "productName", + "productCode", + "productVersionName", + "mirrorOpenshiftPush", + "components" + ], + "properties": { + "components": { + "items": { + "required": ["name", "description"] + } + } + } + } + } + } + } + } + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "pyxis" + } + } + } + }, + "then": { + "required": ["pyxis"], + "properties": { + "pyxis": { + "required": ["server", "secret"] + } + } + } + }, + { + "if": { + "properties": { + "systems": { + "contains": { + "const": "mapping" + } + } + } + }, + "then": { + "properties": { + "mapping": { + "properties": { + "components": { + "items": { + "required": ["name", "repository"] + } + } + } + } + } + } } ] } diff --git a/tasks/check-data-keys/README.md b/tasks/check-data-keys/README.md index cb14707d4..cc9053a8c 100644 --- a/tasks/check-data-keys/README.md +++ b/tasks/check-data-keys/README.md @@ -13,7 +13,11 @@ Currently, `releaseNotes`, and `cdn` are the only supported systems. |----------|---------------------------------------------------------|----------|---------------| | dataPath | Path to the JSON string of the merged data to use | No | | | systems | The systems to check that all data keys are present for | Yes | [] | -| schema | The URl to the schema | Yes | https://github.com/konflux-ci/release-service-catalog/blob/production/schema/dataKeys.json | +| schema | The URl to the schema | Yes | https://github.com/konflux-ci/release-service-catalog/blob/development/schema/dataKeys.json | + +## Changes in 1.1.0 +* Add `-L` option to curl command to follow redirects for schema download. +* Fixes README.md `schema` parameter description. ## Changes in 1.0.0 * Replacing the check with a schema validator diff --git a/tasks/check-data-keys/check-data-keys.yaml b/tasks/check-data-keys/check-data-keys.yaml index 831af6222..54eebaef5 100644 --- a/tasks/check-data-keys/check-data-keys.yaml +++ b/tasks/check-data-keys/check-data-keys.yaml @@ -40,10 +40,11 @@ spec: exit 1 fi - if ! curl -s --fail-with-body "$(params.schema)" -o /tmp/schema ; then + if ! curl -sL --fail-with-body "$(params.schema)" -o /tmp/schema ; then echo "Failed to download schema file: $(params.schema)" exit 1 fi + cat "$(workspaces.data.path)/$(params.dataPath)" systemsJSON=$(echo "$@" | jq -R 'split(" ")') @@ -51,4 +52,6 @@ spec: "$(workspaces.data.path)/$(params.dataPath)" > "/tmp/systems" mv "/tmp/systems" "$(workspaces.data.path)/$(params.dataPath)" + cat /tmp/schema + check-jsonschema --output-format=text --schemafile "/tmp/schema" "$(workspaces.data.path)/$(params.dataPath)"