SCM Sync configuration plugin

Skip to end of metadata
Go to start of metadata

Introduction

Syncs configuration files to a SCM repository and tracks changes done to them

Plugin Information

Plugin ID scm-sync-configuration Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
0.0.7.4
Feb 12, 2014
1.409
subversion (version:1.39)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Frederic Camblor (id: fcamblor)
Bertrand Paquet (id: bpaquet)
Usage Installations 2013-Apr 1313
2013-May 1377
2013-Jun 1399
2013-Jul 1490
2013-Aug 1556
2013-Sep 1644
2013-Oct 1706
2013-Nov 1766
2013-Dec 1747
2014-Jan 1967
2014-Feb 2035
2014-Mar 2125

SCM Sync Configuration Jenkins/Hudson plugin is aimed at 2 main features :

  • Keep sync'ed your config.xml (and other ressources) jenkins/hudson files with a SCM repository
  • Track changes (and author) made on every file with commit messages

Installation

Warning
A critical bug is hitting v0.0.7 if you have maven multimodules (lots of undesired commits are performed)
More infos on issue issue #17545
This issue is fixed in 0.0.7.1
Warning
Seems like a blocking bug is hitting v0.0.6 on windows jenkins installations.
More infos on issue issue #15285
This issue is fixed in 0.0.6.1
Warning
Prior to v0.0.3, If you are trying to synchronize your configuration file with a SVN repository using another protocol than http/https, synchronization won't occur.
This is related to issue #8871
Warning
A blocker bug has been detected if you are using m2release plugin. Don't install scm-sync-configuration plugin 0.0.1 if you are in this case !
Update: Bug has been fixed in 0.0.2

To install SCM Sync Configuration Plugin, Go to the "plugin management" section in the administration Panel.
Latest released version will be available. Install it from there (you should need to restart Jenkins/Hudson after that).

To verify that the plugin is well installed, go to the Administration panel, then in the "System configuration" section : you should notice a "SCM Sync Configuration" section :

Usage

On the System configuration panel (seen above), you'll be prompted for a SCM type (as of this writing, Subversion or Git) and a repository URL for your SCM type.

When you'll complete this form section, and validate the form, the SCM Sync Configuration will compute every configuration file he is able to synchronize, and commit them, for initialization, on your SCM repository.
Warning : This first step can take a few minutes !

Once initialized, every time you'll submit a configuration view that can be sync'ed by the SCM Sync Configuration plugin, you'll be prompted for a comment that will be put on the commit message on your SCM Repository.

For now, supported configuration files are the following ones :

  • Job configuration files (/jobs/*/config.xml)
  • Global Jenkins/Hudson system configuration file (/config.xml)
  • Basic plugin configuration files (/hudson*.xml, /scm-sync-configuration.xml)
  • User-defined manual includes (see this dedicated page)

But more default configuration files are planned ! (see the Product Backlog for further informations)

On every pages, you will have some scm sync config status at the bottom of the page, saying if something went wrong :

Warning
To use a Git server with SSH, you have to accept the server SSH key before using the plugin (same for using Git in Jenkins jobs).

Troubleshootings

A page dedicated to Scm Sync Configuration troubleshoots has been created. Don't hesitate to participate on it by telling your stories.

What is synchronized, and when

Constraint Target Configuration family Target configuration files Modes
version >= 0.0.1 Job & children configuration /job/*/config.xml Creation, Update
version >= 0.0.2 Jenkins/Hudson System configuration /config.xml Creation, Update
version >= 0.0.5 Jenkins configuration files located directly in JENKINS_HOME /hudson*.xml Creation, Update
version >= 0.0.6 Manual user-defined includes Whatever you want Creation, Update
version >= 0.0.7.2 Users config files /users/*/config.xml Creation, Update

Known issues

Product backlog

When I am... I should be able to ... More details ... Implemented ?
An administrator Globally : Provide auth parameters to several SCM repository
types : subversion, cvs, git etc...
Jenkins/Hudson configuration files will be sync'ed with this
repository
Done !
An administrator Globally : Tell what types of configuration files will be sync'ed :
job configurations, system configuration, views configurations,
user profiles
Each configuration type should be represented by
 a specific strategy
Not yet
An administrator Globally : Should decide to initialize SCM repository with every current configuration files   Done !
An administrator Globally : Should decide to retrieve (and override) every sync'ed
files (on initialization step for example)
  Coming soon !
An administrator Globally : call a REST-like URL allowing to commit files with a
comment from outside of Jenkins/Hudson behaviour
For example, when using groovy scripts which
modify config files
Not yet !
An administrator Globally : Could check a "read-only" field allowing, for an
jenkins/hudson instance, to mirror another jenkins/hudson instance configuration
Read only flag will implies to never commit anything
(and don't prompt for commit message) but config
file update will be performed either automatically, or manually
Not yet
A privileged* user Per type of sync'ed configuration file : Check if current file is
up-to-date with HEAD revision of the file in the SCM repository.
If not, propose to checkout last revision of the file
from the SCM repository, and replace the current one!
Coming soon !
A privileged* user Per type of sync'ed configuration file : When submitting form,
input a commit message saying what sort modifications has
been done on form
New version of the file will be commited on SCM.
Current user id & message will be used in the commit
 message
Done !
A privileged* user Per type of sync'ed configuration file : Consult commit history
for target configuration file
  Not yet !

*Privileged user can be, for example, user having access to job configuration update when job configuration is sync'ed.

Releases

0.0.7.3 (July, 24th, 2013)

Bugfixes

  • issue #18867 (major) : New link allowing to purge fail logs for scm-sync-configuration was breaking the page if jquery plugin was pulled on the instance

Improvements

  • Synchronized users config files

0.0.7.2 (July, 20th, 2013)

Bugfixes

Improvements

  • Allowing to reset scm sync status failing file, by clicking on an hyperlink (administrators only)
    Thanks to Joey Jiao for his contribution in PR #16

0.0.7.1 (May, 24th, 2013)

Bugfixes

  • issue #17545 (critical) : On multimodules jobs, submodules' config.xml were constantly (on every build) commited on repository, resulting in lots of noise in commits history, and even blacklistings on github

0.0.7 (January, 25th, 2013)

This release should likely have been tagged 0.0.6.2 instead of 0.7.0, there isn't any big step by upgrading.

Bugfixes

  • issue #14893 : scm sync configuration causes memory leak (thanks mhelff)
  • Not nesting RuntimeException into ServletException, fixing spring security redirection to login page (thanks ndeloof)

0.0.6.1 (October, 28th, 2012)

Bugfixes

  • issue #14640 : Create view form was not handled correctly on 1.466 and above
  • issue #15266 : Reducing SCM Sync commits logs to FINEST level (instead of INFO)
  • issue #15285 : Fixed blocking bug on Windows installations where plugin didn't start correctly

0.0.6 (September, 18th, 2012)

Improvements

  • User defined files being committed (issue #8225 which implies issue #14642, issue #14812, issue #15018) : Now, you can add user-defined custom paths to synchronize on the system page. Don't hesitate to share yours on the dedicated page.
  • Commits should be made asynchronously (issue #14214 which implies, I think, issue #9166 and issue #10967) : now, commiting files is not blocking but postponed into an asynchronous queue. This will lead in performance improvements on large jenkins instance + lower the chance to have concurrent modifications on files (file content to commit is saved).
  • Bulk transactional commit (issue #13613) : before v0.0.6, 1 file modified = 1 commit. Prior to 0.0.6, if during an HTTP request, you modify several files, they will all be committed into a single commit.
    It should greatly improve the commit readability, and lead to atomic commits.
    Note that "automatic" (ie "non manual") file changes will remain commited one by one (this is difficult to identify a "system-wide transaction").
  • Allowing to reload configuration files from SCM : added an hyperling on global Jenkins configuration page for doing this
  • Commit messages improved (issue #14568) : now, deleted / renamed / updated files are labeled into the commit "technical part" of the message

Bugs

  • issue #14582 : Fix issue when your jenkins webapp has a context path (not the context root)

Known Bugs on this release

  • If you're using Git, job rename won't work as expected. This is related to issue #15128 which relies on a bug in maven scm api. Once the bug will be fixed in maven scm api, I'll align on it and it will fix the problem in the plugin.
  • A regression has been identified (issue #15221) concerning the initial check in when jenkins starts.
    In previous version, if some files in jenkins_home were not present in the scm, these files were added. In 0.0.6 it isn't the case and should considered as a major regression.

0.0.5 (April, 25th, 2012)

Improvements

  • Added Git support – Big thanks to Bertrand Paquet
  • *Allowing to display latest synchronization status * (configurable in jenkins configuration screen) – thanks to Bertrand Paquet
  • Saving every Jenkins configuration files located directly in JENKINS_HOME – thanks to Bertrand Paquet
  • Allowing to use a repository without credentials – thanks to Bertrand Paquet
  • Added checkbox to disable commit prompt, forever – thanks to Bertrand Paquet
  • Fixed issue #11817 and issue #10858 : Allow to provide a commit message formatter (you will be able to add prefixes to your commit messages, with issue id for example)
  • Fixed issue #10802 : In relation to previous bugfix, provide a commit message on initial upload of config.
    Note that you will have to make a trick to make this work, as I described in this comment
  • Fixed issue #11106 : Automatically set focus to commit message field when prompt appear

Tasks

  • Welcome Bertrand Paquet aboard !

0.0.4 (March, 9th, 2011)

Bugfixes

  • Fixed issue #8453 : NPE after updating to 0.0.3 (data migration problem)
  • Fixed issue #8890 : SCM Sync plugins 0.0.3 throws NPE when called before having been initialized (for example when using shelve plugin in correlation with scm-sync-configuration plugin)

Improvements

  • issue #8259 Added "don't bother me" checkbox on commit message popup
  • Added log when credentials have not been entered when trying to connect to scm
  • Provided Data migration layer allowing to migrate scm-sync-configuration.xml data from 0.0.2 -> 0.0.3 -> 0.0.4 -> ...
  • Replaced use of Embedder by DefaultPlexusContainer to ensure compliance of the plugin with Hudson/Jenkins versions greater than 1.395 (apparition of sisu)
  • Replaced "<" and ">" by "[" and "]" (the ones are hidden when used in log console)

Tasks

  • Moved sources to Github !
  • Lots of Unit tests added (especially about data migration between plugin versions)
  • Refactored unit tests to use Mockito instead of EasyMock

0.0.3 (January, 4th, 2011)

Bugfixes

  • issue #8197 Using jenkins/hudson SVN credentials to authenticate against subversion server instead of the ones in your .subversion cache !
    This is more relevant with the UI, prompting for scm credentials and storing them in jenkins/hudson credentials.
  • issue #7762 Only /jobs//config.xml are commited (instead of /jobs/*/config.xml) – This fixes some plugin files (example : M2Release plugin files) which were unintentionally synchronized with scm
  • issue #7982 Fixed NPE around ScmSyncConfigurationPlugin:59

Improvements

  • Deleting svn hierarchy on job deletion
  • Renaming svn hierarchy on job renaming
  • Comment message prompted on "configure" job screen .. even if configuring a job through a view
  • Improved logging
  • issue #8259 Provided "no synchronisation" radio in system configuration page, allowing to disable scm synchronisation after having enabled it
  • Changed scm-sync-configuration.xml file representation (SCM is no more an enum type, and become an abstract classes with subclasses) + provided data migrator from 0.0.2 & 0.0.1 file representations

Tasks

  • Provided plugin description for plugin rss feed
  • Provided unit tests harness for testing scm synchronizations (~50% test coverage) + refactored code to improve testability

0.0.2 (October, 15th, 2010)

Bugfixes

  • issue #7241 : Critical bug: IE8 users wasn't able to submit their configuration form due to a JS error.

Improvements

  • Jenkins/Hudson System configuration is now sync'ed
  • scm-sync-configuration v0.0.2 has been tested with IE8, Chrome 5, FF 2 under windows 7
  • Added JS exception catching in order to not block the process if a JS error occurs (because of an incompat with non tested browser)
  • Some little refactorings on config files initialization in scm repository

Tasks

  • Provided name & wiki url to the POM. These information are used on several pages of jenkins-ci/hudson-ci (especially RSS feeds)

0.0.1 (October, 12th, 2010)

Warning
This is an alpha release ! Don't use it in production, especially if you are using M2Release jenkins/hudson plugin

Improvements

  • SCM Repository configuration in system panel
  • Prompt for commit message each time a Job Configuration is modified

Roadmap (future versions)

v0.1

  • (done) Provide a "commit everything modified with following comment" button on system page (Will be useful if you want to globally edit your config files (via a groovy console script for example) and commit everything with a comment)
  • Provide first strategy implementation allowing to backup every of your job configuration files (when submitting job configuration form) with a personnal commit message
  • Refactor the SCM access layer, dropping usage of maven scm api in favour to jenkins scm API which will allow credentials sharing

v0.2

  • Provide up-to-date checker for the first implementation, allowing to replace current job configuration with a newer one commited on the SCM
  • (done) Provide several new strategies to sync various configuration files : views, system, users related : issue #8225
  • (done) Allow administrator to select which of configuration type should be sync'ed (or not)

v0.3

  • Provide configuration history on each configuration type page
  • (done) Provide new SCM connection implementations : cvs, git, others?

Current bugs to solve before v0.1

  • Replace special linux characters ( " for example) when syncing
  • Check if updated repository on system config page is empty and display a warning if not

Greetings to our sponsors

I'm a proud user of .
Feel free to download and test this IDE, it's worth a try !

Labels

Edit
scm scm Delete
synchronisation synchronisation Delete
backup backup Delete
configuration configuration Delete
plugin-misc plugin-misc Delete
plugins-misc plugins-misc Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment