Skip to content

Helm chart validation error if a commit hash starts with 8 or more numbers #1179

@faust2199

Description

@faust2199

Describe the bug
[ Credit goes to @renedupont ] A Helm chart can contain a values.schema.json where data types are validated. The imageTag is supposed to be a string, because it is basically taken from the short commit hash and usually has a letter in it. Sometimes the leading 8 characters of the commit hash are all numbers. With the current implementation, such a special commit hash will cause the validation to fail, because helm interprets it as a number, rather than a string.

To Reproduce
Steps to reproduce the behavior:

  1. Work on a component branch with auto deployment enabled
  2. Generate a commit with the leading 8 characters of the commit hash all numbers
  3. Push the code
  4. See error in Jenkins

Expected behavior
Commit hashes with leading numbers should not abort Jenkins builds.

Screenshots
N/A

Affected version (please complete the following information):

  • OpenShift: 4.x
  • OpenDevStack 4.x

Log Output (ensure to remove any confidential information like tokens, project names, etc.

Error: values don't meet the specifications of the schema(s) in the following chart(s):
random-project:
- global.imageTag: Invalid type. Expected: string, given: integer

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions