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

Role Strategy: Configuration-as-Code compatibility

    XMLWordPrintable

    Details

    • Epic Name:
      Role Strategy: JCasC
    • Similar Issues:

      Description

      Configuration-as-Code is the (proposed) mechanism to configure jenkins master automatically from plain text recipes. It relies on component internal model auto-discovery, and as such assume plugins do follow best practices for UI data-binding and internal design. Updating this component to allow for direct interaction is requested. There is a current work-around in the Configuration-as-Code-Support plugin, which would be appreciated if it got incorporated into this plugin. The bits pertaining this specific plugin, can be found here

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          https://github.com/jenkinsci/role-strategy-plugin/pull/46 is a foundation pull request for it.

          Now the code can be moved from JCasC to Role Strategy

           

          Show
          oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/role-strategy-plugin/pull/46  is a foundation pull request for it. Now the code can be moved from JCasC to Role Strategy  
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          I have also added this issue as an example of changes which could be done in the plugin for Google Summer of Code 2016

          Show
          oleg_nenashev Oleg Nenashev added a comment - I have also added this issue as an example of changes which could be done in the plugin for Google Summer of Code 2016
          Hide
          renescheibe René Scheibe added a comment -

          So JCasC is not yet fully supported? I saw it mentioned in the changelog for v2.7.0.

          I still see issues with a simple setup:

          • role-strategy plugin v2.9.0
          • enabled Authorization "Role-Based Strategy"
          • no further configuration of this plugin

          Exporting the configuration with JCasC results in:

            authorizationStrategy: "FAILED TO EXPORT hudson.model.Hudson#authorizationStrategy:\
              \ \nio.jenkins.plugins.casc.ConfiguratorException: Cannot find configurator for\
              \ type class com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy\n\
              \tat io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry$1.load(DefaultConfiguratorRegistry.java:97)\n\
              \tat io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry$1.load(DefaultConfiguratorRegistry.java:93)\n\
              \tat com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)\n\
              \tat com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)\n\
              \tat com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)\n\
              \tat com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)\n\t\
              at com.google.common.cache.LocalCache.get(LocalCache.java:3965)\n\tat com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)\n\
              \tat com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)\n\
              \tat io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry.lookupOrFail(DefaultConfiguratorRegistry.java:70)\n\
              \tat io.jenkins.plugins.casc.ConfigurationContext.lookupOrFail(ConfigurationContext.java:71)\n\
              \tat io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:160)\n\
              \tat io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:43)\n\
              \tat io.jenkins.plugins.casc.Attribute.describe(Attribute.java:196)\n\tat io.jenkins.plugins.casc.core.JenkinsConfigurator.describe(JenkinsConfigurator.java:8
              \tat io.jenkins.plugins.casc.core.JenkinsConfigurator.describe(JenkinsConfigurator.java:30)\n\
              \tat io.jenkins.plugins.casc.ConfigurationAsCode.export(ConfigurationAsCode.java:411)\n\
              \tat io.jenkins.plugins.casc.ConfigurationAsCode.doExport(ConfigurationAsCode.java:401)\n\
              ...
          
          Show
          renescheibe René Scheibe added a comment - So JCasC is not yet fully supported? I saw it mentioned in the changelog for v2.7.0. I still see issues with a simple setup: role-strategy plugin v2.9.0 enabled Authorization "Role-Based Strategy" no further configuration of this plugin Exporting the configuration with JCasC results in: authorizationStrategy: "FAILED TO EXPORT hudson.model.Hudson#authorizationStrategy:\ \ \nio.jenkins.plugins.casc.ConfiguratorException: Cannot find configurator for \ \ type class com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy\n\ \tat io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry$1.load(DefaultConfiguratorRegistry.java:97)\n\ \tat io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry$1.load(DefaultConfiguratorRegistry.java:93)\n\ \tat com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)\n\ \tat com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)\n\ \tat com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)\n\ \tat com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)\n\t\ at com.google.common.cache.LocalCache.get(LocalCache.java:3965)\n\tat com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)\n\ \tat com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)\n\ \tat io.jenkins.plugins.casc.impl.DefaultConfiguratorRegistry.lookupOrFail(DefaultConfiguratorRegistry.java:70)\n\ \tat io.jenkins.plugins.casc.ConfigurationContext.lookupOrFail(ConfigurationContext.java:71)\n\ \tat io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:160)\n\ \tat io.jenkins.plugins.casc.impl.configurators.HeteroDescribableConfigurator.describe(HeteroDescribableConfigurator.java:43)\n\ \tat io.jenkins.plugins.casc.Attribute.describe(Attribute.java:196)\n\tat io.jenkins.plugins.casc.core.JenkinsConfigurator.describe(JenkinsConfigurator.java:8 \tat io.jenkins.plugins.casc.core.JenkinsConfigurator.describe(JenkinsConfigurator.java:30)\n\ \tat io.jenkins.plugins.casc.ConfigurationAsCode.export(ConfigurationAsCode.java:411)\n\ \tat io.jenkins.plugins.casc.ConfigurationAsCode.doExport(ConfigurationAsCode.java:401)\n\ ...
          Hide
          nthienan An Nguyen added a comment -

          Really need this to be done. I'm willing to support, please tell me where I can start. 

          Show
          nthienan An Nguyen added a comment - Really need this to be done. I'm willing to support, please tell me where I can start. 
          Hide
          jnz_topdanmark Jon Brohauge added a comment -

          An Nguyen You could fork the project and introduce the fix in a PR. Afterwards ask the maintainer to review the PR.

          Show
          jnz_topdanmark Jon Brohauge added a comment - An Nguyen You could fork the project and introduce the fix in a PR. Afterwards ask the maintainer to review the PR.

            People

            • Assignee:
              Unassigned
              Reporter:
              jnz_topdanmark Jon Brohauge
            • Votes:
              4 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: