-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: tell user if they use rhsa with no cves sooner
We already tell the user they can't use an RHSA with no cves in the create-advisory task. However, the new set-severity-task runs before the create-advisory task and will also fail if the user specifies RHSA with no cves (it will say it couldn't find a severity for any cve). This commit adds the same error message from create-advisory to set-advisory-severity so it is more clear to the user. Signed-off-by: Johnny Bieren <[email protected]>
- Loading branch information
1 parent
e83ebc0
commit ab28cde
Showing
3 changed files
with
73 additions
and
2 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
59 changes: 59 additions & 0 deletions
59
tasks/managed/set-advisory-severity/tests/test-set-advisory-severity-rhsa-no-cves.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,59 @@ | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: test-set-advisory-severity-rhsa-no-cves | ||
annotations: | ||
test/assert-task-failure: "run-task" | ||
spec: | ||
description: | | ||
Test for set-advisory-severity where the releaseNotes.type is RHSA but no cves are listed. | ||
The task should fail | ||
workspaces: | ||
- name: tests-workspace | ||
tasks: | ||
- name: setup | ||
workspaces: | ||
- name: data | ||
workspace: tests-workspace | ||
taskSpec: | ||
workspaces: | ||
- name: data | ||
steps: | ||
- name: setup-values | ||
image: quay.io/konflux-ci/release-service-utils:0b2f257d7a5c2a881c36c23f8ae3cd5e89db593a | ||
script: | | ||
#!/usr/bin/env sh | ||
set -eux | ||
cat > "$(workspaces.data.path)"/data.json << EOF | ||
{ | ||
"releaseNotes": { | ||
"type": "RHSA", | ||
"content": { | ||
"images": [ | ||
{ | ||
"containerImage": "foo" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
EOF | ||
- name: run-task | ||
taskRef: | ||
name: set-advisory-severity | ||
params: | ||
- name: dataPath | ||
value: data.json | ||
- name: pipelineRunUid | ||
value: $(context.pipelineRun.uid) | ||
- name: taskGitUrl | ||
value: "http://localhost" | ||
- name: taskGitRevision | ||
value: "main" | ||
workspaces: | ||
- name: data | ||
workspace: tests-workspace | ||
runAfter: | ||
- setup |