configuration-as-code-plugin icon indicating copy to clipboard operation
configuration-as-code-plugin copied to clipboard

JCasC Configuration History: New feature or Plugin

Open oleg-nenashev opened this issue 5 years ago • 2 comments

There are plugins which show Configuration history for jobs and system settings:

  • https://plugins.jenkins.io/jobConfigHistory
  • https://plugins.jenkins.io/pipeline-config-history

What if we somehow reuse/extend the Pipeline Config History codebase in order to track and visualize YAML configuration changes inside Jenkins? It might be later useful for Pipeline as YAML definitions like Wolox CI or https://github.com/jenkinsci/simple-pull-request-job-plugin

CC @Jochen-A-Fuerbacher @RobinRSchulz

oleg-nenashev avatar Jul 22 '19 06:07 oleg-nenashev

Great idea, @oleg-nenashev!

As both history plugins get triggered by a listener, JCasC should provide a listener in order to let them track changes. Then it could be integrated very easily. At the moment I'm not sure which plugin is the best candidate for this issue.

What's your opinion, @RobinRSchulz?

Jochen-A-Fuerbacher avatar Jul 22 '19 07:07 Jochen-A-Fuerbacher

I also find that to be a good idea:)

Since PipelineCH and JobCH differ in the way the storage gets triggered (config save (jch) <-> build completion (pch)) maybe the pch plugin is not the best place. On the other hand, it surely would make sense for pch to be able to show pipeline as YAML definitions.

We're currently thinking about a support plugin which also could contain this functionality. Using this plugin, your proposal is implemented (partly in jobconfighistory, which already tracks xml system configs or maybe a separate JCasC Config History plugin) and pipelineconfighistory also profits from that.

However, it might take some time to develop the support plugin and refactor the architecture of both pch and jch to use it.

RobinRSchulz avatar Jul 26 '19 10:07 RobinRSchulz