Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63173

Configuration constantly modified by workflow-job plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I've created a job using the Job DSL plugin.

      My DSL is very simple, something like:

       

      pipelineJob('foo') {
        definition {
          cpsScm {
            scm {
              git {
                remote {
                  url('git@github.com:foo.git')
                  credentials('github-ssh-cred')
                }
                branch('master')
                browser {
                  githubWeb {
                    repoUrl('')
                  }
                }
              }
            }
            scriptPath('foo.groovy')
          }
        }
      }

       

      This creates a config like this (just the first few lines):

      <?xml version="1.0" encoding="UTF-8"?><flow-definition>
      <actions/>
      <definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition">
      

      The problem is that when the job actually runs, workflow-job-plugin appears to dynamically modify the config:

       

      <?xml version="1.0" encoding="UTF-8"?><flow-definition plugin="workflow-job@2.35">
      <actions>
      <org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobAction plugin="pipeline-model-definition@1.3.9"/>
      </actions>
      <definition class="org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition" plugin="workflow-cps@2.74">

      This clutters the job config history with so many changes as to make it useless. It also causes a warning to appear that the job has been modified since being seeded, and makes it impossible to tell when jobs have actually been manually modified (in a way that would be dangerous).

       

      As far as I can tell, there's no way to capture these changes in a DSL file or prevent them from occurring.

      Originally discussed in JENKINS-52591, where someone suggested opening a new issue for this plugin.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            danep Dane Powell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: