-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-56805] Support Configuration as Code #48
Conversation
@ndeloof Sorry for the late response. This PR doesn't build (anymore), could you please look into that? The test and sample config look reasonable, but please fix up license headers & Javadoc. There's also #46 and I need your and @MadsNielsen's help to figure out which is the better approach, as I'm not sure what's going on exactly -- are they alternatives, if so, what are the pros/cons? Or do they complement each other? Is there some synergy for CasC and Job DSL (#45) to be had, or are they too dissimilar for that? CC @daspilker |
I'm not sure about #46 intent, I haven't seen the "JCasC side" of this PR. But if we get Configurator hosted in plugin this probably would make more sense. About #45 I don't know Job DSL enough to tell you the exact impact but I guess it relies on comparable mechanisms, just focussing on job configuration. We both need the same level of "cleanup" in jenkins plugins :) Will update this PR once 0.10-alpha has been released. |
…in matrix-auth plugin jenkinsci/configuration-as-code-plugin#197 Signed-off-by: Nicolas De Loof <[email protected]>
@ndeloof Thanks for the explanation. Please ping me out of band if I miss the PR update. |
Signed-off-by: Nicolas De Loof <[email protected]>
updated with some changes : projectMatrix:
grantedPermissions:
- "Overall/Read:anonymous"
- "Overall/Administer:authenticated" waiting for 0.10-alpha release |
Still failing. Please specify the snapshot dependency using a timestamp for the artifact you uploaded. |
close jenkinsci/configuration-as-code-plugin#352 Signed-off-by: Nicolas De Loof <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
I don't understand this access modifier failure :-\ |
@ndeloof Most were due to outdated parent POM. |
Test failures since the configuration-as-code snapshot still includes the classes now moved here? |
Signed-off-by: Nicolas De Loof <[email protected]>
cyclic dependency, as I should have anticipated. Need to remove dependency from JCasC |
Signed-off-by: Nicolas De Loof <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mighty fine 👍
What's the plan to release this + that? Ideally I'd like to give this a spin without time pressure while a release of CasC is out that doesn't support matrix-auth anymore, or are your early adopters unusually accepting of breakage? |
As an early adopter I say breakage is expected 👍 It is still alpha for that reason |
@daniel-beck I'd expect custom configurator removed for JCasC in next alpha release (some weeks at most). |
I moved the current CI issue into #51 |
.../jenkinsci/plugins/matrixauth/integrations/casc/MatrixAuthorizationStrategyConfigurator.java
Show resolved
Hide resolved
Add support for loading 'grantedPermissions' in CasC
.../jenkinsci/plugins/matrixauth/integrations/casc/MatrixAuthorizationStrategyConfigurator.java
Outdated
Show resolved
Hide resolved
.../jenkinsci/plugins/matrixauth/integrations/casc/MatrixAuthorizationStrategyConfigurator.java
Outdated
Show resolved
Hide resolved
src/test/resources/org/jenkinsci/plugins/matrixauth/integrations/configuration-as-code.yml
Outdated
Show resolved
Hide resolved
src/test/java/org/jenkinsci/plugins/matrixauth/integrations/ConfigurationAsCodeTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this out on a clone of my production setup,
Existing vars worked, and logged the deprecation warning:
WARNING: Loading deprecated attribute 'grantedPermissions' for instance of 'hudson.security.GlobalMatrixAuthorizationStrategy'. Use 'permissions' instead.
and if I update it I no longer get the warning
Also tested modifying the config and viewing the export at:
http://localhost:8088/configuration-as-code/viewExport
looks good
great work @daniel-beck
src/test/java/org/jenkinsci/plugins/matrixauth/integrations/casc/ExportTest.java
Show resolved
Hide resolved
No incrementals due to:
I assume master needs merging in for an incrementals build? |
@timja I did that, deployment is https://repo.jenkins-ci.org/incrementals/org/jenkins-ci/plugins/matrix-auth/2.4-rc247.5d90c4bd1f21/ |
Nice, anything left to do on this? |
Ideally more reviews confirming I didn't take a wrong turn somewhere, since I'm not a user of any of this myself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM one oddity but it is super minor.
Move configuration-as-code support in matrix-auth plugin
Configuration-as-Code JEP-201 allow to configure a full jenkins master from a plain text definition. We'd like this feature hosted by the implementor.
see jenkinsci/configuration-as-code-plugin#197