From 7534f8c301a05b9dd73aaeb594e0251de35064f1 Mon Sep 17 00:00:00 2001 From: Tayler Geiger Date: Fri, 19 Apr 2024 13:53:32 -0500 Subject: [PATCH] Make NOTES.txt check optional Also change command help message to say "NOTES.txt" --- internal/chartverifier/checks/checks.go | 4 ++-- internal/chartverifier/profiles/default.go | 2 +- internal/profileconfig/profiles/profile-partner-1.3.yaml | 2 +- internal/profileconfig/profiles/profile-redhat-1.3.yaml | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/chartverifier/checks/checks.go b/internal/chartverifier/checks/checks.go index 887a3203..90e770ff 100644 --- a/internal/chartverifier/checks/checks.go +++ b/internal/chartverifier/checks/checks.go @@ -39,8 +39,8 @@ const ( APIVersion2 = "v2" ReadmeExist = "Chart has a README" ReadmeDoesNotExist = "Chart does not have a README" - NotesExist = "Chart does contain NOTES" - NotesDoesNotExist = "Chart does not contain NOTES" + NotesExist = "Chart does contain NOTES.txt" + NotesDoesNotExist = "Chart does not contain NOTES.txt" NotHelm3Reason = "API version is not V2, used in Helm 3" Helm3Reason = "API version is V2, used in Helm 3" TestTemplatePrefix = "templates/tests/" diff --git a/internal/chartverifier/profiles/default.go b/internal/chartverifier/profiles/default.go index edee5d45..b1facdf5 100644 --- a/internal/chartverifier/profiles/default.go +++ b/internal/chartverifier/profiles/default.go @@ -43,7 +43,7 @@ func getDefaultProfile(msg string) *Profile { {Name: fmt.Sprintf("%s/%s", CheckVersion10, apiChecks.ChartTesting), Type: apiChecks.MandatoryCheckType}, {Name: fmt.Sprintf("%s/%s", CheckVersion10, apiChecks.RequiredAnnotationsPresent), Type: apiChecks.MandatoryCheckType}, {Name: fmt.Sprintf("%s/%s", CheckVersion10, apiChecks.SignatureIsValid), Type: apiChecks.MandatoryCheckType}, - {Name: fmt.Sprintf("%s/%s", CheckVersion10, apiChecks.HasNotes), Type: apiChecks.MandatoryCheckType}, + {Name: fmt.Sprintf("%s/%s", CheckVersion10, apiChecks.HasNotes), Type: apiChecks.OptionalCheckType}, } return &profile diff --git a/internal/profileconfig/profiles/profile-partner-1.3.yaml b/internal/profileconfig/profiles/profile-partner-1.3.yaml index 37afe3db..f51832d0 100644 --- a/internal/profileconfig/profiles/profile-partner-1.3.yaml +++ b/internal/profileconfig/profiles/profile-partner-1.3.yaml @@ -35,5 +35,5 @@ checks: - name: v1.0/signature-is-valid type: Mandatory - name: v1.0/has-notes - type: Mandatory + type: Optional diff --git a/internal/profileconfig/profiles/profile-redhat-1.3.yaml b/internal/profileconfig/profiles/profile-redhat-1.3.yaml index 07f2a00b..90271a9c 100644 --- a/internal/profileconfig/profiles/profile-redhat-1.3.yaml +++ b/internal/profileconfig/profiles/profile-redhat-1.3.yaml @@ -35,5 +35,4 @@ checks: - name: v1.0/signature-is-valid type: Mandatory - name: v1.0/has-notes - type: Mandatory - + type: Optional