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

JCasC in Kubernetes #2572

Open
danielstankw opened this issue Oct 7, 2024 · 1 comment
Open

JCasC in Kubernetes #2572

danielstankw opened this issue Oct 7, 2024 · 1 comment
Labels

Comments

@danielstankw
Copy link

Jenkins and plugins versions report

Hi,
I am using Jenkins deployed in Kubernetes.
I also used CasC which I define in values.yaml section of the helm chart, by adding it to the configScripts section.
It works but its not optimal. I would like to have CaSc defined outside of values.yaml and inject it, I tried:

Placing casc.yaml config files in the folder of "/var/jenkins_home/casc_config/jenkins.yaml but I wasnt able to get it to work
Similarly adding git repo with yamls in ConfigUrls didnt work.
I guess issue could be due to lack of permissions or wrong setup, would anyone who got it to work be able to share with me how they configured it?

JCasC:
# -- Enables default Jenkins configuration via configuration as code plugin
defaultConfig: true

# If true, the init container deletes all the plugin config files and Jenkins Config as Code overwrites any existing configuration
# -- Whether Jenkins Config as Code should overwrite any existing configuration
overwriteConfiguration: false
# -- Remote URLs for configuration files.
configUrls: []
# - https://acme.org/jenkins.yaml
# -- List of Jenkins Config as Code scripts
configScripts: 
  welcome-message: |
    jenkins:
      systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'.

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

Ubuntu

Reproduction steps

xxx

Expected Results

xxx

Actual Results

xxx

Anything else?

xxx

@matt-locker
Copy link

@danielstankw
Have you set the environment?
CASC_JENKINS_CONFIG /var/jenkins_home/casc_config

Is the plugin installed?
jenkins-plugin-cli -f /tmp/plugins.txt

plugins.txt must contain configuration-as-code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants