Git Product home page Git Product logo

configuration-as-code-plugin's Issues

Ability to configure Users

Need some way to configure users and UserProperties, including (but not limited) to HudsonPrivateSecurityRealm$Details to pre-configure admin user with a password

Create user scenarios for running Jenkins

This should in result become a part of documentation, but first we'll use it to discover possible use cases and create follow up issues.

  1. running from scratch with official docker image (provided by us, plugin preinstalled, wizard disabled)
  2. installing plugin on working Jenkins instance (wizard not an issue)
  3. pre-packaged opinionated Jenkins distributions (plugin preinstalled, wizard an issue)

[Feature] Hierarchy and reuse of configuration

A customer have many teams, each with their own Jenkins. The teams needs to inherit a standard configuration available, and then add their own team specific configuration.
The standard configuration should be able to be overwritten if the team want to use 99% and not only add to it.
What happens when the standard configuration is updated?

[Feature] Make UI read-only once managed by CasC

Refresh button - so I can reload configuration from files, without restarting Jenkins
Optional locking down changes in the UI blocking users from changing it without updating the config file
Export configuration - if I have Jenkins already configured, or just made some changes in UI and want to keep them in the file

Descriptors configuration

as discussed on mailing list
We have no way to guess Descriptors data model, until they move to DataBoundSetters to "document" their UI databinding.
But this is not enough : Descriptor are mutable objects, and DataBound mechanism don't reset object so some optional attribute becomes null if not-set on UI. So it might be necessary to ask plugin developers to implement the configure(StaplerRequest, JSONObject) method as:

  • reset everything to default values
  • invoke data binding req.bind(json)
  • save descriptor save()

Maybe there's some way to make this the default mechanism ?

Jenkinsfile incompatible with ci.jenkins.io

The current Jenkinsfile in praqma/dev is incompatible with ci.jenkins.io (the CI instance of the Jenkins project that builds all plugins in the @jenkinsci organization) by selecting a node label that just doesn't exist. This adds queue items that never start.

screen shot

Since we're using a GH org folder, our ability to configure individual projects is limited.

While I personally would advocate for just using that Jenkins instance for all your CI needs, a quick fix could be to just return from the Jenkinsfile if the JENKINS_URL.contains('.jenkins.io') or similar.

Discover "delegation" in attributes management

Some attributes are owned by Jenkins root class for legacy reasons but managed from a web UI point of view using GlobalConfiguration implementation (typically : security has a dedicated page).
We'd like to be able to discover this from the java codebase so we can mimic in the yaml model, so

jenkins:
  securityRealm: ...

would become :

jenkins:
  security:
     securityRealm:  ...

Export existing Jenkins configuration to YML

To make it really easy migrate already running Jenkins instances to Configuration as Code, or to just use Jenkins itself as editor for the YML file an export functionality should be supplied to the user from our UI footprint.

I imagine a kind of Export current configuration button or link, that will show the current Jenkins configuration as YML and make it easy to download it.

The user can then save the YML file to git and other places, and supply it back to a new or existing Jenkins instance to start using Configuration as Code Plugin.

I would expect also to be able to download the needed plugin.yml that described the needed plugin on my current instance.

Disable setup wizard

Configuration as code should fully setup Jenkins, so setup wizard should be automatically disabled.

Group global configuration options to mimic web UI

On web UI, tool installers are all configured within Jenkins > Manage > Tools subpage. As we consider the web UI to be some "natural end-user documentation" we want to mimic this in the YAML document structure.

[Feature] Plugin installation

If we install new plugins in the plugin.yml file, how can they be updated without restart as many plugins require restart on update.

Documentation not generated - Caught exception evaluating (...)

WARNING: Caught exception evaluating: it.configurators in /jenkins/plugin/configuration-as-code/. Reason: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
	at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
	at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
	at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
	at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
	at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
	at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
	at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
	at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
	at org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61)
	at org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsIterator(ExpressionSupport.java:94)
	at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:89)
	at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
	at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
	at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
	at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:95)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
	at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
	at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112)
	at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:140)
	at org.kohsuke.stapler.IndexViewDispatcher.dispatch(IndexViewDispatcher.java:30)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Configuration-as-Code can't handle type class hudson.security.LegacySecurityRealm
	at org.jenkinsci.plugins.casc.Configurator.lookup(Configurator.java:85)
	at org.jenkinsci.plugins.casc.HeteroDescribableConfigurator.lambda$getConfigurators$0(HeteroDescribableConfigurator.java:33)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at org.jenkinsci.plugins.casc.HeteroDescribableConfigurator.getConfigurators(HeteroDescribableConfigurator.java:34)
	at org.jenkinsci.plugins.casc.ConfigurationAsCode.listElements(ConfigurationAsCode.java:82)
	at org.jenkinsci.plugins.casc.ConfigurationAsCode.getConfigurators(ConfigurationAsCode.java:53)
	... 93 more

Simple improved styling and layout of autogenerated documentation

On host/plugin/configuration-as-code the helpful documentation can be found, but it is hard to read due to indentation and layout.

As a user I would like a simple styling making the indentation very visual and match the YAML configuration I'm supposed to write.

A very simple layout with font's and other styling helping read it would be nice as well. Maybe a also a table of content.

Can't select AuthorizationStrategy = unsecured

hudson.security.AuthorizationStrategy.Unsecured has no DataBoundConstructor. From configuration-as-code point of view it appears as a custom implementor for newinstance that we can't support.

Maybe we can introduce as an extended convention to search enclosing class for a constant with same name (i.e UNSECURED).

SPI for configuration source

Current prototype do load configuration from ./jenkins.yaml
We force sure want more flexibility

  • Load from a set of files
  • Load from a configurable folder (env variable)
  • Load from a kubernetes configMap
  • Load from docker config

Defining an SPI for configuration source that a complementary plugin can implement would make this flexible enough to support extensibility to various use-cases.

move unclassified Descriptors under "jenkins:"

we're trying to mimic UI as much as possible, but our current solution doesn't support it

in UI we have

  • jenkins
    -- mailer
    -- artifactorybuilder
    -- ...
  • tools
    -- git
    -- ...

when in yaml it's

  • jenkins
    -- ...
  • mailer
  • artifactorybuilder
  • tools
    -- git
    -- ...

can we maybe treat each element UNDER jenkins as root element? so it can be matched with RootElementConfigurators even if it's not a root in yaml? does it even make sense?

Role Strategy support PoC

Rile Strategy plugin has a complex Authorization configuration logic, which use custom logic in Descriptors. So CasC plugin won't support it OOTB, but the plugin is an important part of the plugin ecosystem. I would like to add the plugin support, the implementation and code location is TBD

[Feature] Seedjob - genesis job is not part of CasC

If we have all global configuration as CasC, we still need to get at least one job up and running to start with that can create all job- and view-related things. This is not part of CasC, so maybe this should be a feature of our container docker4jcasc much like the old one contribute with this genesis seedjob thing.

Prepare migration description

describe how to proceed when someone wants to migrate existing traditionally configured Jenkins to as-code solution

Clean-up our Praqma repo we forked from

selection_010

Bit confusing to see this message when we actually only today are working in the jenkinsci fork.

We should clean up so they are in sync, or a least the the jenkinsci fork in front.

As being part of Praqma I like this really cool initiative is forked from Praqma's github account, but it doesn't constitute a really good excuse to make it look like a mess.

We also had one contribution to our Praqma repo... so users might also be confused.

If it isn't easy to clean up, we can have Github support staff break the fork.

Support env variable to point jenkins.yaml location

on praqma/dev branch we have implemented support for reading location of jenkins.yaml file from environment variable, that can point to local file, or repository - maybe it's time to move this functionality to master branch?

Create and maintain a casc demo instance online

To show the concept for real and running we have discussed to have a demon instance running live people can visit and also browse the documentation and configuration of as we propose it to be used.

We can host such one in Praqma, and I see two options for us:

  1. our current Jenkins cloud instance running the old concept JenkinsAsCodeReference could be migrated casc, but we miss a series of plugin to do that
  2. we could create an deploy a new one we where we would then only host this plugin and a pipeline for it

No matter what option we go for, we should point the users to this "demo" instance as an example and supply them with information like:

  • our jenkins.yml and plugin.yml files - public repository
  • documentation on how we maintain the instance (deployment, upgrades etc)
  • how they could clone the project, and create a copy test instance of it themselves (without our credentials it would only work with how far their own credentials reach though)

[Feature] Handling credentials

Handling credentials as code may not be a trivial issue, from security and usability point of view.

The way it was used in the old JAC version is not satisfying - keep credentials, like passwords, in a plain text file under .ssh directory on a host machine.
When deploying Jenkins remotely it meant you had to ssh to the machine and create files there, then JAC redeployment - heavy operation just to add credentials... No better solution in my head yet, but maybe it's time to start discussing it.

[Feature] Support Build slave maintainers

There is a plugin to maintain build slaves, allowing slave administrators to configure their slaves. How can that work if the slave configuration is in our new jenkins.yml file? The customer said they have delegated responsibility for this configuration based on the ownership plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.