-
Type:
Bug
-
Resolution: Not A Defect
-
Priority:
Major
-
Component/s: configuration-as-code-plugin, oic-auth-plugin
-
None
Hello,
after migration from jenkins version 2.361.4 to Jenkins 2.479.3 my JCACS broke up for my implementation OIC for keycloak by reload-configuration. My old OIC configuration on old version was OK but after migration via documentation I edit my following code for OIC, but there are some problems and I dont know why. When I setup OIC by manual in Jenkins and then I checked plugin JCASC in Jenkins, but looks like my configuration, but my configuration didnt work for my reload-configuration.
Jenkins setup: v.2.479.3
oic-auth:4.494.v6b_f419104767
configuration-as-code:1953.v148f87d74b_1e
My JCASC for OIC:
jenkins:  securityRealm:   oic:    allowedTokenExpirationClockSkewSeconds: 0    clientId: "jenkins-test"    clientSecret: "{example}"    disableSslVerification: false    emailFieldName: "email"    escapeHatchSecret: "{example}"    fullNameFieldName: "name"    groupIdStrategy: "caseSensitive"    groupsFieldName: "groups"    logoutFromOpenidProvider: false    userIdStrategy: "caseSensitive"    userNameField: "preferred_username"    serverConfiguration:     manual:      authorizationServerUrl: https://keycloak.test.com/auth/realms/test/protocol/openid-connect/auth      endSessionUrl: https://keycloak.test.com/auth/realms/test/protocol/openid-connect/logout      issuer: https://keycloak.test.com/auth/realms/test      jwksServerUrl: https://keycloak.test.com/auth/realms/test/protocol/openid-connect/certs      scopes: "profile email openid"      tokenAuthMethod: client_secret_basic      tokenServerUrl: https://keycloak.test.com/auth/realms/test/protocol/openid-connect/token      userInfoServerUrl: https:// keycloak.test.com /auth/realms/test/protocol/openid-connect/userinfo
A got error by reload-configuration job:
Started by upstream project "service/update" build number 25 originally caused by: Started by user unknown or anonymous Running as anonymous [EnvInject] - Loading node environment variables. Building in workspace /var/lib/jenkins/jobs/service/jobs/reload-configuration/workspace ERROR: Build step failed with exception io.jenkins.plugins.casc.ConfiguratorException: Found incompatible configuration elements YamlSource: /var/lib/jenkins/jenkins_config/jaac/oic-settings.yaml  in /var/lib/jenkins/jenkins_config/jaac/oic-settings.yaml, line 3, column 5:     oic:     ^         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.yaml.ErrorOnConflictMergeStrategy.merge(ErrorOnConflictMergeStrategy.java:21)         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.yaml.ErrorOnConflictMergeStrategy.merge(ErrorOnConflictMergeStrategy.java:44)         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.yaml.ErrorOnConflictMergeStrategy.merge(ErrorOnConflictMergeStrategy.java:44)         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.yaml.YamlUtils.merge(YamlUtils.java:46)         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.yaml.YamlUtils.loadFrom(YamlUtils.java:102)         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:733)         at PluginClassLoader for configuration-as-code//io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:356)         at io.jenkins.plugins.casc.ConfigurationAsCode$configure$0.call(Unknown Source)         at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)         at Script1.run(Script1.groovy:2)         at groovy.lang.GroovyShell.evaluate(GroovyShell.java:574)         at groovy.lang.GroovyShell.evaluate(GroovyShell.java:612)         at groovy.lang.GroovyShell.evaluate(GroovyShell.java:583)         at PluginClassLoader for script-security//org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:378)         at PluginClassLoader for script-security//org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript.evaluate(SecureGroovyScript.java:315)         at PluginClassLoader for groovy//hudson.plugins.groovy.SystemGroovy.run(SystemGroovy.java:100)         at PluginClassLoader for groovy//hudson.plugins.groovy.SystemGroovy.perform(SystemGroovy.java:64)         at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)         at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)         at hudson.model.Build$BuildExecution.build(Build.java:199)         at hudson.model.Build$BuildExecution.doRun(Build.java:164)         at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:527)         at hudson.model.Run.execute(Run.java:1831)         at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)         at hudson.model.ResourceController.execute(ResourceController.java:101)         at hudson.model.Executor.run(Executor.java:445) Build step 'Execute system Groovy script' marked build as failure Finished: FAILURE
Thank you! ![]()