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

Add BranchProperty support to OrganizationFolder

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I would like to list BranchProperties at OrganizationFolder level and make them applicable to child jobs. I'm looking at OrganizationFolder/configure-entries.jelly , and I see that you are already doing this for BranchBuildStrategies.

       

      <j:set var="descriptors" value="${descriptor.getPropertyType(instance,'buildStrategies').applicableItemDescriptors}"/>
      <j:if test="${!descriptors.isEmpty()}">
      <f:entry title="${%Build strategies}" help="${descriptor.getHelpFile('buildStrategies')}">
      <f:hetero-list name="buildStrategies" items="${instance.buildStrategies}"
      descriptors="${descriptors}"
      hasHeader="true" honorOrder="true"/>
      </f:entry>
      </j:if>

      Could you please add a property to OrganizationFolder class similar to buildStrategies so branch properties can be retrieved and propagated at Org level.

      In my scenario:

      I want to setup GitHub PR Comment Build Plugin at the Github Organization level, and propagate that branch property to all child jobs created.

        

        Attachments

          Activity

          Hide
          bb3rn4rd Bernard Baltrusaitis added a comment - - edited

          Stephen Connolly , since most of code is written by you, could you please point me in the right direction or suggest a workaround.

          At present time I believe I could extend OrganizationFolder in order to add additional functionality, but I'm not sure if that's a right assumption

          Show
          bb3rn4rd Bernard Baltrusaitis added a comment - - edited Stephen Connolly , since most of code is written by you, could you please point me in the right direction or suggest a workaround. At present time I believe I could extend OrganizationFolder in order to add additional functionality, but I'm not sure if that's a right assumption
          Hide
          stephenconnolly Stephen Connolly added a comment -

          Bernard Baltrusaitis no this is functionality that should be core in branch-api in other words, this is an enabling change.

          What you need to do is modify Organization Folders so that it has a "Property Strategy" directly above it (like a Multibranch folder does, only multibranch has multiple sources, so can have multiple strategies)

          Ideally SCMNavigator would have been held in a wrapper class like SCMSource is held in a Branch and then we would just add the PropertyStrategy to that wrapper class, however, multiple navigators per org-folder is just too complex (it's bad enough with multiple sources per multi-branch) so don't worry about that.

          If you have time and inclination to work on this then file a PR and I can see about reviewing.

          I do not have time to work on this myself, but it is aligned with my vision, so if it is not done and I have some spare time to implement then I would probably implement it myself... however right now I do not have any spare time to work on this 

          Show
          stephenconnolly Stephen Connolly added a comment - Bernard Baltrusaitis no this is functionality that should be core in branch-api in other words, this is an enabling change. What you need to do is modify Organization Folders so that it has a "Property Strategy" directly above it (like a Multibranch folder does, only multibranch has multiple sources, so can have multiple strategies) Ideally SCMNavigator would have been held in a wrapper class like SCMSource is held in a Branch and then we would just add the PropertyStrategy to that wrapper class,  however , multiple navigators per org-folder is just too complex (it's bad enough with multiple sources per multi-branch) so don't worry about that. If you have time and inclination to work on this then file a PR and I can see about reviewing. I do not have time to work on this myself, but it is aligned with my vision, so if it is not done and  I have some spare time to implement  then I would probably implement it myself... however  right now I do not have any spare time to work on this  

            People

            • Assignee:
              bb3rn4rd Bernard Baltrusaitis
              Reporter:
              bb3rn4rd Bernard Baltrusaitis
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: