Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CasC issue with gitLabConnectionConfig : empty connection created #1643

Open
touzoun opened this issue Mar 21, 2024 · 0 comments
Open

CasC issue with gitLabConnectionConfig : empty connection created #1643

touzoun opened this issue Mar 21, 2024 · 0 comments
Labels
bug For changelog: Minor bug. Will be listed after features

Comments

@touzoun
Copy link

touzoun commented Mar 21, 2024

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

GitLab Plugin Version 1.8.0

Reproduction steps

When applying this casc :

      gitLabConnectionConfig:
        connections:
        - apiTokenId: {{ .Values.envVars.gitlabId | quote }}
          clientBuilderId: "autodetect"
          connectionTimeout: 10
          ignoreCertificateErrors: false
          name: "gitlab"
          readTimeout: 10
          url: {{ printf "http://%s" .Values.global.principalScmHost | quote }}
        useAuthenticatedEndpoint: true

an empty connection appears in the configuration .
When exporting the conf-as-code, I can see an added bloc causing the empty connection :

  gitLabConnectionConfig:
    connections:
    - apiTokenId: "xxx"
      clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      name: "gitlab"
      readTimeout: 10
      url: "http://xxxx"
    - clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      readTimeout: 10
    useAuthenticatedEndpoint: true

Expected Results

i don't want this added :

    - clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      readTimeout: 10
    useAuthenticatedEndpoint: true

Actual Results

  gitLabConnectionConfig:
    connections:
    - apiTokenId: "xxx"
      clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      name: "gitlab"
      readTimeout: 10
      url: "http://xxxx"
    - clientBuilderId: "autodetect"
      connectionTimeout: 10
      ignoreCertificateErrors: false
      readTimeout: 10
    useAuthenticatedEndpoint: true

Anything else?

No response

Are you interested in contributing a fix?

No response

@touzoun touzoun added the bug For changelog: Minor bug. Will be listed after features label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features
Projects
None yet
Development

No branches or pull requests

1 participant