#1523 allow koji tags to be created with a configurable permission
Merged 4 years ago by mprahl. Opened 4 years ago by cobrien.
cobrien/fm-orchestrator issue_1478  into  master

@@ -528,11 +528,13 @@ 

          # only if we are creating the build_tag for first time.

          build_tag_exists = self.koji_session.getTag(self.tag_name + "-build")

  

+         tag_perm = self.config.koji_tag_permission

+ 

          # Create or update individual tags

          # the main tag needs arches so pungi can dump it

-         self.module_tag = self._koji_create_tag(self.tag_name, self.arches, perm="admin")

+         self.module_tag = self._koji_create_tag(self.tag_name, self.arches, perm=tag_perm)

          self.module_build_tag = self._koji_create_tag(

-             self.tag_name + "-build", self.arches, perm="admin")

+             self.tag_name + "-build", self.arches, perm=tag_perm)

  

          buildopts = self.mmd.get_buildopts()

          if buildopts and buildopts.get_rpm_whitelist():

@@ -164,6 +164,11 @@ 

              "default": ["module", "scrmod"],

              "desc": "List of allowed koji tag prefixes.",

          },

+         "koji_tag_permission": {

+             "type": str,

+             "default": "admin",

+             "desc": "Permission name to require for newly created Koji tags.",

+         },

          "koji_tag_extra_opts": {

              "type": dict,

              "default": {

Remove hard-coded admin permission and allow it to be specified as a configuration option named koji_tag_permission. Default configuration value if unset is admin (ie. behavior unchanged by default)

Fixes #1478

Build #624 failed (commit: 12acc92).
Rebase or make new commits to rebuild.

Pull-Request has been merged by mprahl

4 years ago