question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CASC reload not working after configuration deletion

See original GitHub issue
  • [ 2.235.2] Jenkins version

  • [1.42 ] Plugin version

  • [Linux - jenkins/jenkins:lts image ] OS

Description

If i delete existing configuration section from jenkins.yml file and perform configuration as a code reload - configuration is not deleted and is still present with last values specified in jenkins.yml file.

This configuration is added if i define it for the first time or change it - everything works as expected:

jenkins:
  systemMessage: "JENKINS"

But when i delete this “systemMessage” attribute configuration is still present in Jenkins UI and config.xml:

jenkins:
 #systemMessage: "JENKINS"

Is this expected behavior or bug…? What would solution would you suggest if i want to delete existing configuration from jenkins.yml and apply this deletion?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maifujalamcommented, Apr 12, 2021

I am also facing similar issue. Becasuse when I removed docker cloud from CasC and reloaded.Then also docker cloud is showing in UI.This is a bug.

0reactions
reder9commented, Sep 23, 2021

I am also experiencing the same, when I remove a configuration from CasC and reload it still shows in the UI even though its not there in the yaml files. Im able to add things and reload just fine but deletions dont seem to take effect.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting CasC for controllers
The potential reasons are as follows: There is a change in the Jenkins version and the instance must be updated or the configuration...
Read more >
Configuration as Code - Jenkins
Click Reload existing configuration to load the local changes onto the Jenkins server. Verify the changes on the UI.
Read more >
jenkinsci/configuration-as-code-plugin - Gitter
I use CasC heavily and I have many parameterised pipelines using active choice, active choice reactive parameters and everything in Jenkinsfile pulled from...
Read more >
How to reload "configuration-as-code" using a pipeline script ...
My code is based on the "via Groovy script" example in the configuration-as-code documentation import io.jenkins.plugins.casc.
Read more >
[JCasC] job parameters lost when re-starting docker container ...
[JCasC] job parameters lost when re-starting docker container / reloading existing ... Problem is (again and again) the first run of pipeline after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found