Yes it is working as designed.
https://jenkins.io/doc/pipeline/steps/workflow-multibranch/#properties-set-job-properties
"Note that any existing properties of the job will be replaced with the
list given here."
It would be nice to be able to modify job properties rather than overwrite
everythin
It also means if you use a JobDSL statement to generate a Pipeline job with
authorization {
permission('...
then if your Pipeline Jenkinsfile uses
options {
buildDiscarder(
It wipes out the permissions, since they both use the properties mechanism,
which only works once.
I'm not
Project properties are not cumulative when additional settings are set
during the pipeline.
For example, if setting a Parameterized build and later in the pipeline,
a Discard Old Builds is set, the Parameterized build is unset.
I had this happening when the Discard Old Builds were used in a