Search code examples
jenkinscontinuous-integrationjenkins-pluginsjenkins-pipelinesalt-project

Jenkins configurations gets reverted by SYSTEM user anomaly


I am running Jenkins version 2.85 on Kubernetes as pod(Affinity set to one workernode). I am creating Jobs using Salt Jenkins module by passing XML to this module.

I am using Jenkins Global Library for preforming job execution.

My Job config looks like thisenter image description here enter image description hereenter image description here

I am calling GobalLibrary with my parameters like repoURL, componet etc..,

Things goes well for weeks and now I landed to a weird situation where my job configurations(config.xml) gets updated/revert automatically.

Intermittently my "Build with parameter" options disappears and I can see only "Build now" in Jenkins GUI. Initially I thought someone is doing this, so to track the config changes I installed Job config history plugin in Jenkins and what I find is strange. Someone with "SYSTEM" username is making/reverting changes.

This is how it looks

enter image description here

and what I find is SYSTEM user revert only JOB config changes, not the PIPELINE.

enter image description here enter image description here

I am not sure what's going wrong behind the scenes and how to stop or fix this. This is my Production instance so I am more worried.

I can see a SYSTEM user in my Jenkins

enter image description here

but I can not delete that user

enter image description here

Few relevant Question I find for this but with no answers

Configuration of Jobs getting updated by System user on Jenkins

Jenkins SYSTEM user removes custom workspace configuration

I am not sure if this Jenkins Bug or some plugin is playing with my soul.

Need help! :(


Solution

  • Okay I find the answer to this problem.

    I have used properties in my Jekins Global Library something like this

    // Disable concurrent builds
    //properties([disableConcurrentBuilds()])
    

    which overrides my external job configuration(done via salt).

    Hint I get from this blog: https://st-g.de/2016/12/parametrized-jenkins-pipelines