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

Extension point for marking generated items

    XMLWordPrintable

Details

    Description

      When using multibranch projects or Job DSL, some Item s (usually Job or AbstractFolder) have a config.xml which is generated by some process and not intended to be editable by the user. This information is not currently available to core or other plugins (backup, etc.); it should be. Suggest something like

      public interface GeneratedItemMarker extends ExtensionPoint {
          boolean isGenerated(Item item);
      }
      

      which would be implemented by job-dsl to to check for GeneratedObjectsAction as here and by branch-api by checking whether the parent is MultiBranchProject or OrganizationFolder.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            As outlined in JENKINS-32596, this could perhaps also be used to remove some hacks in the way CONFIGURE is currently denied on branch projects as well as multibranch folders inside organization folders. Denying DELETE is however trickier since that is sensitive to the branch liveness status, as seen here, whereas the branch project should be considered “generated” whether the branch is alive or dead.

            jglick Jesse Glick added a comment - As outlined in JENKINS-32596 , this could perhaps also be used to remove some hacks in the way CONFIGURE is currently denied on branch projects as well as multibranch folders inside organization folders. Denying DELETE is however trickier since that is sensitive to the branch liveness status, as seen here , whereas the branch project should be considered “generated” whether the branch is alive or dead.

            Sounds reasonable and should be easy to implement in job-dsl.

            daspilker Daniel Spilker added a comment - Sounds reasonable and should be easy to implement in job-dsl.

            People

              Unassigned Unassigned
              jglick Jesse Glick
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: