Declarative is over-eager in deleting job properties not defined in the Jenkinsfile

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Before JENKINS-44149, Declarative only called the properties step if there was a JobProperty, Trigger, or ParameterDefinition specified in the Jenkinsfile. This was, in point of fact, not the right behavior - if you had a Trigger but no other JobProperty or ParameterDefinition and then you removed that Trigger from the Jenkinsfile, it wouldn't actually get removed from the job, since there were no JobProperty/Trigger/ParameterDefinition specified in the Jenkinsfile. So...with JENKINS-44149, we changed to instead call the properties step if there were no JobProperty/Trigger/ParameterDefinition as well. Hooray, correct behavior!

      Buuuuut.

      If you had never had any of those things in your Jenkinsfile but you were using a non-mulitbranch Pipeline and specifying triggers, properties, parameters, etc in the Jenkins UI for the standalone job, those now get wiped out, whether you like it or not. That is not ideal. We really should be only removing things that were defined in the Jenkinsfile previously.

            Assignee:
            Andrew Bayer
            Reporter:
            Andrew Bayer
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: