Git Product home page Git Product logo

Comments (4)

ndeloof avatar ndeloof commented on July 18, 2024

We can expose a web hook to (re)run configuration-as-code on a live instance, so the yaml configuration is applied again.
We could even offer this as a custom github web-hook implementation

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

This can be implemented by calling ConfigurationAsCode#configure() after yaml config content has been refreshed. Remaining question is to detect such change occurred.
Simplest option I have in mind is for use to expose an UnprotectedRootAction so some external tooling can notify jenkins on update, typically

  1. config.yml is managed by Chef recipies
  2. chef agent run and updates this content
  3. chef recipe do notify jenkins on update

(or comparable mechanism based on kubernetes' ConfigMap, docker Config, local git clone, etc)

configuration-as-code would then track configuration file by checksum, and will actually re-configure only if some actual changes have been detected.

We could also rely on inotify (java.nio.file.WatchService) to re-configure immediately on file updates.

from configuration-as-code-plugin.

ndeloof avatar ndeloof commented on July 18, 2024

Suggest we first implement a ManagementLink to offer some UI for configuration-as-code (which files where loaded, last time loader, etc) and a human friendly "reload" button.
Then we could also have various implementations for opt-in reload mechanisms:

  • watch files
  • SIGHUP support
  • web hook
  • ...

such options being manageable by configuration-as-code for sure !

from configuration-as-code-plugin.

fwilhe avatar fwilhe commented on July 18, 2024

I'm trying to find info how to trigger reloading the config via hook on github. Is this implemented? How does it work?

Figured it out, this url shema seems to work: http://jenkins.ci/configuration-as-code/replace?_.newSource=https://github.url/raw/username/jenkins-configuration-as-code/master/jenkins.yaml

from configuration-as-code-plugin.

Related Issues (20)

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.