-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(RELEASE-1400): add references in populate-release-notes task
This commit renames the populate-release-notes-images task to populate-release-notes. The new version of the task adds references if the type is RHSA. One is a static reference and there is also a reference added per CVE listed in releaseNotes. Signed-off-by: Johnny Bieren <[email protected]>
- Loading branch information
1 parent
e309aa8
commit 3b4aa8b
Showing
12 changed files
with
308 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
...managed/populate-release-notes/tests/test-populate-release-notes-non-rhsa-references.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: test-populate-release-notes-non-rhsa-references | ||
spec: | ||
description: | | ||
Run the populate-release-notes task with a type that is RHSA. Ensure that no additional references | ||
are added | ||
workspaces: | ||
- name: tests-workspace | ||
tasks: | ||
- name: setup | ||
workspaces: | ||
- name: data | ||
workspace: tests-workspace | ||
taskSpec: | ||
workspaces: | ||
- name: data | ||
steps: | ||
- name: setup | ||
image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f | ||
script: | | ||
#!/usr/bin/env sh | ||
set -eux | ||
cat > "$(workspaces.data.path)/data.json" << EOF | ||
{ | ||
"releaseNotes": { | ||
"product_id": 123, | ||
"product_name": "Red Hat Openstack Product", | ||
"product_version": "123", | ||
"cpe": "cpe:/a:example:openstack:el8", | ||
"type": "RHBA", | ||
"issues": { | ||
"fixed": [ | ||
{ | ||
"id": "RHOSP-12345", | ||
"source": "issues.example.com" | ||
}, | ||
{ | ||
"id": 1234567, | ||
"source": "bugzilla.example.com" | ||
} | ||
] | ||
}, | ||
"synopsis": "test synopsis", | ||
"topic": "test topic", | ||
"description": "test description", | ||
"solution": "test solution", | ||
"references": [] | ||
} | ||
} | ||
EOF | ||
cat > "$(workspaces.data.path)/snapshot.json" << EOF | ||
{ | ||
"application": "myapp", | ||
"components": [ | ||
{ | ||
"name": "comp", | ||
"containerImage": "registry.io/image@sha256:123456", | ||
"repository": "quay.io/redhat-prod/product----repo", | ||
"rh-registry-repo": "registry.redhat.io/product/repo", | ||
"tags": [ | ||
"foo", | ||
"bar" | ||
] | ||
} | ||
] | ||
} | ||
EOF | ||
- name: run-task | ||
taskRef: | ||
name: populate-release-notes | ||
params: | ||
- name: dataPath | ||
value: "data.json" | ||
- name: snapshotPath | ||
value: "snapshot.json" | ||
workspaces: | ||
- name: data | ||
workspace: tests-workspace | ||
runAfter: | ||
- setup | ||
- name: check-result | ||
workspaces: | ||
- name: data | ||
workspace: tests-workspace | ||
taskSpec: | ||
workspaces: | ||
- name: data | ||
steps: | ||
- name: check-result | ||
image: quay.io/konflux-ci/release-service-utils:e633d51cd41d73e4b3310face21bb980af7a662f | ||
script: | | ||
#!/usr/bin/env sh | ||
set -eux | ||
test "$(jq '.releaseNotes.references | length' "$(workspaces.data.path)/data.json")" \ | ||
== 0 | ||
runAfter: | ||
- run-task |
Oops, something went wrong.