Skip to content

Unable to add shared library details under unclassified section using latest jenkins chart #1341

@vsyamala1

Description

@vsyamala1

Describe the bug

We want to add our global shared library section in our jenkins value file and we are following below document: https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/README.md#breaking-out-large-config-as-code-scripts

jenkins:
controller:
JCasC:
configScripts:
unclassifiedCasc: |
unclassified:

Image

Here is the error we are getting:

20624 warnings.go:70] Use tokens from the TokenRequest API or manually created secret-based tokens instead of auto-generated secret-based tokens.
Error: UPGRADE FAILED: failed to create resource: ConfigMap "jenkins-test1-jenkins-config-unclassifiedCasc" is invalid: metadata.name: Invalid value: "jenkins-test1-jenkins-config-unclassifiedCasc": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

Version of Helm and Kubernetes

- Helm: v3.17.2
- Kubernetes: v1.28.11+vmware.2

Chart version

jenkins-5.8.24

What happened?

1.Add the shared library section in jenkins values file using https://github.com/jenkinsci/helm-charts/blob/main/charts/jenkins/README.md#breaking-out-large-config-as-code-scripts 

jenkins:
  controller:
    JCasC:
      configScripts:
        unclassifiedCasc: |
          unclassified:


2. Deploy the jenkins chart and you will see this error
 20624 warnings.go:70] Use tokens from the TokenRequest API or manually created secret-based tokens instead of auto-generated secret-based tokens.
Error: UPGRADE FAILED: failed to create resource: ConfigMap "jenkins-test1-jenkins-config-unclassifiedCasc" is invalid: metadata.name: Invalid value: "jenkins-test1-jenkins-config-unclassifiedCasc": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

...

What you expected to happen?

Shared-Library should reflect in Jenkins-UI

How to reproduce it

Anything else we need to know?

No response

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