summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Kucia <matt.kucia@aptiv.com>2020-03-24 21:46:02 +0800
committerMatt Kucia <matt.kucia@aptiv.com>2020-03-24 21:57:05 +0800
commit08be52c23eff9f02867ddac0dc1d9ea3b3f6ba03 (patch)
treeb50288950d8899700817d8deca0f628a48e19c78
parent9cff4f295ec8020fa3a3ac15795a344666596770 (diff)
downloadpython-jenkins-job-builder-08be52c23eff9f02867ddac0dc1d9ea3b3f6ba03.tar.gz
python-jenkins-job-builder-08be52c23eff9f02867ddac0dc1d9ea3b3f6ba03.tar.xz
python-jenkins-job-builder-08be52c23eff9f02867ddac0dc1d9ea3b3f6ba03.zip
modules/properties: Multibranch projects have folder structure
Without this change, multibranch project creation with authorization parameter would fail with hudson.security.AuthorizationMatrixProperty cannot be cast to com.cloudbees.hudson.plugins.folder.AbstractFolderProperty Change-Id: Ie83355705f0526f2984eca0e5f1f80fba8b1ba5f
-rw-r--r--jenkins_jobs/modules/properties.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py
index 867d5399..5be64a0c 100644
--- a/jenkins_jobs/modules/properties.py
+++ b/jenkins_jobs/modules/properties.py
@@ -1268,6 +1268,8 @@ class Properties(jenkins_jobs.modules.base.Base):
if "project-type" in data:
if data["project-type"] == "folder":
prop["authorization"]["_use_folder_perms"] = True
+ elif data["project-type"] == "multibranch":
+ prop["authorization"]["_use_folder_perms"] = True
else:
prop["authorization"]["_use_folder_perms"] = "folder" in data
else: