configuration-as-code-plugin | Jenkins Configuration as Code Plugin | Plugin library

 by   jenkinsci Java Version: 1647.ve39ca_b_829b_42 License: MIT

kandi X-RAY | configuration-as-code-plugin Summary

kandi X-RAY | configuration-as-code-plugin Summary

configuration-as-code-plugin is a Java library typically used in Plugin, Ansible, Jenkin, Docker applications. configuration-as-code-plugin has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub.

Setting up Jenkins is a complex process, as both Jenkins and its plugins require some tuning and configuration, with dozens of parameters to set within the web UI manage section. Experienced Jenkins users rely on groovy init scripts to customize Jenkins and enforce the desired state. Those scripts directly invoke Jenkins API and, as such, can do everything (at your own risk). But they also require you to know Jenkins internals and are confident in writing groovy scripts on top of Jenkins API. The Configuration as Code plugin is an opinionated way to configure Jenkins based on human-readable declarative configuration files. Writing such a file should be feasible without being a Jenkins expert, just translating into code a configuration process one is used to executing in the web UI. The below configuration file includes root entries for various components of your primary Jenkins installation. The jenkins one is for the root Jenkins object, and the other ones are for different global configuration elements. Additionally, we want to have a well-documented syntax file and tooling to assist in writing and testing, so end users have full guidance in using this toolset and do not have to search for examples on the Internet. See the presentation slides from DevOps World - Jenkins World 2018 for an overview.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              configuration-as-code-plugin has a medium active ecosystem.
              It has 2548 star(s) with 693 fork(s). There are 87 watchers for this library.
              There were 6 major release(s) in the last 12 months.
              There are 78 open issues and 702 have been closed. On average issues are closed in 268 days. There are 18 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of configuration-as-code-plugin is 1647.ve39ca_b_829b_42

            kandi-Quality Quality

              configuration-as-code-plugin has 0 bugs and 0 code smells.

            kandi-Security Security

              configuration-as-code-plugin has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              configuration-as-code-plugin code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              configuration-as-code-plugin is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              configuration-as-code-plugin releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              configuration-as-code-plugin saves you 5750 person hours of effort in developing the same functionality from scratch.
              It has 12970 lines of code, 967 functions and 205 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed configuration-as-code-plugin and discovered the below as its top functions. This is intended to give you an instant insight into configuration-as-code-plugin implemented functionality, and help decide if they suit your requirements.
            • Exports the schema to a URL
            • Generate JSON object for non - enum attributes
            • Generate a JSON representation of a helo descriptor object
            • Generates the schema
            • Export the JVM
            • Serializes a YAML node to a writer
            • Serialize a configuration object to YAML
            • Exports the configuration to an output stream
            • Get a list of registered elements
            • Handles a new source
            • Provides list of available attributes
            • Create a new instance for the given CNode
            • Describe the structure
            • Replace source
            • Describe the given descriptor
            • Checks for issues
            • Initialize secrets
            • Provides description of this plugin
            • Gets a Field object by name
            • Reload configuration
            • Resolves the given variable
            • Export the live jenkins instance as yaml
            • Gets user
            • Overriding superclass method
            • Get the given instance
            • Describe the given instance
            Get all kandi verified functions for this library.

            configuration-as-code-plugin Key Features

            No Key Features are available at this moment for configuration-as-code-plugin.

            configuration-as-code-plugin Examples and Code Snippets

            No Code Snippets are available at this moment for configuration-as-code-plugin.

            Community Discussions

            Trending Discussions on configuration-as-code-plugin

            QUESTION

            Jenkins Configuration as Code - migrate configuration from another instance
            Asked 2021-Jan-20 at 09:33

            I'm moving a Jenkins from 'traditional' to JCasC. We have a quite complex setup already, and I am wondering if there is a way to migrate somehow the current configuration without a need of going through settings and code it in .yaml?

            btw. I'm not sure about installing JCasC plugin on prod to see the configuration... Am I wrong?

            Thanks!

            ...

            ANSWER

            Answered 2021-Jan-20 at 09:27

            Make sure to have read the Getting Started and other docs.

            Create new instance (you can do this onto your desktop/laptop) and copy over all the configuration, config.xml,*.xml, secrets and keys, but NO jobs into the new instance. See what to backup.

            Add an entry to start in quiet mode by adding Jenkins.instance.doQuietDown()

            You might want/need to change the url and port config too.depending on host. Mind you, you can do this all onto your desktop/laptop

            Copy the plugins as well. Add the config as code plugin.

            Startup the new instance, export the CasC config and review. The export is a starting point so fill in any missing gaps, etc. For example, since you did not copy jobs over, folders and views will not be created. Some plugin configs are.also not yet implemented.

            Stop Jenkins, delete all the config (except the secret key). Put the JCasC config in place and start up. Compare the new configs to what you backed up/copied over. Repeat until they match. Now you should have a config that matches Prod.

            Now you can install JCasc in Prod. The plugin does nothing until configured. But do a similar backup/compare of Prod config, before and after the config, just in case something changed in the intervening period

            Of course, now you need to mke sure any changes are now only done via JCasC and not the UI, or you are out of sync again. See blog and JEP.

            Source https://stackoverflow.com/questions/65793155

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install configuration-as-code-plugin

            First, start a Jenkins instance with the Configuration as Code plugin installed.
            Those running Jenkins as a Docker container (and maybe also pre-installing plugins), do include Configuration as Code plugin.
            Path to a folder containing a set of config files. For example, /var/jenkins_home/casc_configs.
            A full path to a single file. For example, /var/jenkins_home/casc_configs/jenkins.yaml.
            A URL pointing to a file served on the web. For example, https://acme.org/jenkins.yaml.

            Support

            Most plugins should be supported out-of-the-box or maybe require some minimal changes. See this dashboard for known compatibility issues.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/jenkinsci/configuration-as-code-plugin.git

          • CLI

            gh repo clone jenkinsci/configuration-as-code-plugin

          • sshUrl

            git@github.com:jenkinsci/configuration-as-code-plugin.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link