Skip to content

Commit

Permalink
refactor(RELEASE-1267): rename cve field in populate release notes
Browse files Browse the repository at this point in the history
This commit changes the CVE struct generated in
populate-release-notes-images to switch from the components key to
packages.

Signed-off-by: Johnny Bieren <jbieren@redhat.com>
  • Loading branch information
johnbieren committed Nov 1, 2024
1 parent 891dd02 commit 2c9cb83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions schema/dataKeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@
"additionalProperties": {
"type": "object",
"properties": {
"components": {
"packages": {
"type": "array",
"description": "A list of CVEs fixed e.g. [ 'pkg:golang/golang.org/x/net/http2@1.11.1' ]",
"description": "A list of packages that fixed the CVE e.g. [ 'pkg:golang/golang.org/x/net/http2@1.11.1' ]",
"items": {
"type": "string"
}
Expand Down
3 changes: 3 additions & 0 deletions tasks/populate-release-notes-images/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ in place so that downstream tasks relying on the releaseNotes data can use it.
| dataPath | Path to the JSON string of the merged data to update | No | - |
| snapshotPath | Path to the JSON string of the mapped Snapshot in the data workspace | No | - |

## Changes in 2.2.3
* Rename `components` in the CVE struct to `packages`

## Changes in 2.2.2
* Add component association information

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Task
metadata:
name: populate-release-notes-images
labels:
app.kubernetes.io/version: "2.2.2"
app.kubernetes.io/version: "2.2.3"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -67,7 +67,7 @@ spec:
cveJson=$(jq -n \
--arg id $(jq -r '.key' <<< $cve) \
--argjson packages $(jq -c '.packages' <<< $cve) \
'{($id): {"components": $packages}}')
'{($id): {"packages": $packages}}')
CVEsJson=$(jq --argjson cve "$cveJson" '.cves.fixed += $cve' <<< $CVEsJson)
done
# Add one entry per arch (amd64 for example)
Expand Down

0 comments on commit 2c9cb83

Please sign in to comment.