Plugin Information View Configuration Slicing on the plugin site for more information. This plugin is up for adoption. Want to help improve this plugin? Click here to learn more!
The plugin shows up in Jenkins' UI on the Manage Jenkins page - seen here near the bottom of the page:
The main page of the configuration slicing plugin shows all the properties that can be sliced - select one and you are presented with a screen showing how that value is set across the entire Jenkins instance. Many properties on Jenkins projects are useful to set this way, but the configuration slicing plugin can handle properties on any collection, such as slaves, or builds of a project.
The following functions are supported
- Ant version per project
- Block Build when Downstream Building Slicer (bool)
- Block Build when Upstream Building Slicer (bool)
- Build Timeout (does not support all features)
- Custom Workspace Slicer (Advanced Project Options > Use custom workspace)
- Discard Old Builds Slicer - Days to keep artifacts
- Discard Old Builds Slicer - Days to keep builds
- Discard Old Builds Slicer - Max # of builds to keep
- Discard Old Builds Slicer - Max # of builds to keep with artifacts
- E-mail Notification
- Editable Email Notification (recipient list only)
- Execute Jython script
- Execute Python script
- Execute shell slicer
- Execute Windows batch command slicer
- Gradle version per project
- Groovy version per project
- JDK per project
- Job Disabled Build Slicer (bool)
- Job Disabled Build Slicer (String)
- Job Priority Slicer
- Logfilesizechecker Plugin
- Maven "top-level" targets
- Maven Goals and Options (Maven project)
- Maven Version (Maven Projects)
- MAVEN_OPTS per Maven project
- Parameters
- Quiet period
- SCM Timer Trigger Slicer
- Tied Label Slicer
- Timer Trigger Slicer
- Timestamper Slicer
- Claim Slicer
Boolean slicing
In the case of booleans, the plugin presents a set of checkboxes and names. The user can then adjust that property and save the changes.
String slicing
Most of the slicing uses a GUI much like the following example. You can move the Item Names (i.e. Jobs) around within the boxes on the right to change which jobs have different settings. You can also alter the values on the left to change how jobs are configured. There will always be a blank set of boxes added to the bottom to allow you to create a new setting when you need it. For most of these screens, a value of "(Disabled)" will indicate that those jobs do not use this configuration at all. To disable jobs (e.g. for SCM Polling), move those job names into that "(Disabled)" box.
String slicing multiple values
Some slicers allow you to configure multiple values at a time. In those cases, the values are separated by a comma, and follow the given example.
String slicing multiple Builders
For the Windows batch builder, Shell builders, and "Top-level Maven targets", a job can have multiple builders of each type. To configure jobs like this, you will be presented with an index next to the jobs names like "MyJob[0]" and "MyJob[1]". The index indicates which instance of the builder you are configuring.
This is available under these links
- Execute shell slicer
- Execute Windows batch command slicer
- Maven "top-level" targets
Configuring parameters across multiple jobs
Job Parameters (aka "This build is parameterized") can be configured across multiple jobs at one time through the "Parameters" link. To indicate which parameter you are configuring, note the "JobName[ParameterName]" syntax.
Slicing by View
If you have many jobs, it can be difficult to perform the configuration slicing. To make it more granular, you can configure just the jobs within one view. Assuming you have organized your Jenkins installation to have useful views, this will allow you to configure jobs at the right granularity. To use this feature, first select the type of configuration (in this example "Custom Workspace") and then you will be given a list of views to choose from. You don't have to choose a view, as the default is to show all jobs. If you select one of the views on the left, your list of jobs is filtered down to just the jobs in that view.
Email Notifications and Editable Email Notifications (from 1.41 on)
When editing recipient lists, Email notifications are only completely disabled when set to (Disabled).
Setting a empty recipient list leaves existing email notifications to committers (Checkbox "Notify individuals who broke the build") in place.
Changelog
Version 1.41 - May 31, 2015
- JENKINS-20319 - E-Mail-Configurations are only completely disabled when set to (Disabled). Setting a empty recipient leaves e-mail notifications to committers in place.
- Requires jenkins 1.509.3 and email-ext 2.37
- JENKINS-21225 - Updated Editable email notification to work with email-ext 2.37
- JENKINS-21445 - bug fix in job disabled build slicer
- JENKINS-25964 - NPE in some cases when trying to slice parameters
Version 1.40 - November 15, 2014
Fix bugs related to selection of maven modules or matrix configurations instead of top level project items:
Version 1.39 - October 4, 2014
- JENKINS-16855 - Add support for Claim Slicing
- JENKINS-16869 - Do not show the TimeStamper slicer if the TimeStamper plugin is not installed
- JENKINS-23169 - NullPointerException with newer Jenkins versions
Version 1.38.3 - October 3, 2013
- JENKINS-16305 - Add support for Quiet period configuration slicing
- JENKINS-16828 - NullPointerException in BooleanSlice.get for "Block Build" when slicing by view
- JENKINS-18060 - Add support for logfilesizechecker
- JENKINS-19858 - Visual spacing has degraded dramatically with newer versions of Jenkins (noticed in ver. 1.533)
- JENKINS-14521 - Configuration Slicing should temporarily disable the Auto Refresh plugin
- JENKINS-19855 - Parameters slicer trims default values - including space at the beginning of a Choice Parameter
- Removed support for Workspace Cleanup Plugin (became too complex to perform configuration slicing)
Version 1.37.1 - Sept 30, 2013
- fix regression introduced by folder support (JENKINS-18455)
Version 1.37 - June 4, 2013
- add support for folders
- moved to github
Version 1.36 - October 28, 2012
- JENKINS-14456 - Add support for Workspace Cleanup Plugin
Version 1.35 - October 27, 2012
- Fixed issues with the newer version of the build timeout plugin
- JENKINS-15528 - java.lang.ClassNotFoundException: hudson.plugins.python.Python
- JENKINS-15447 - Warnings with Configuration Slicing plugin
Version 1.33 - Sept 19, 2012
- JENKINS-15152 - Add support for configure 'Block build when upstream project is building' and 'Block build when downstream project is building'
- JENKINS-14784 - Add support for the "execute python script" slicer
Version 1.32 - July 14, 2012
- JENKINS-14417 - Add Timestamper slicer
- JENKINS-11463 - Add configuration slicer for build priority sorter
- JENKINS-13834 - E-mail Notification Slicer issues
- JENKINS-14428 - Provide group operations for "Disable build slicer"
- JENKINS-12294 - "Save" button in slicers should float, just like in the new job config pages
Version 1.31 - May 22, 2012
- JENKINS-13866 - Configuration slicing for parameters
- JENKINS-13867 - Configuration slicing for Maven versions should apply to Free style projects
Version 1.30 - May 20, 2012
- JENKINS-12515 - Add configuration slicing for use of Ant, Gradle and Groovy installations
- JENKINS-13839 - Configure Maven goals for multiple jobs and multiple builders
- JENKINS-12922 - Support changing maven version to multiple jobs at once using configuration slicing plugin
Version 1.29 - May 18, 2012
- JENKINS-13830 - Add windows batch command
- JENKINS-11941 - Configuration Slicing Plugin's "Execute shell slicer" lists first execute shell step only
Version 1.28.1 - December 24, 2011
- JENKINS-12215 - Configuration slicer changes step order
Version 1.27 - November 28, 2011
- JENKINS-11868 - Add configuration slicer for Jenkins build timeout plugin
Version 1.26 - November 24, 2011
- JENKINS-11781 - Configuration Slicing Plugin's "Execute shell slicer" view doesn't support Matrix jobs
Version 1.25 - November 9, 2011
- JENKINS-11649 - Add configuration slicers for Discard Old Builds with artifacts
Version 1.24 - October 26, 2011
- JENKINS-11500 - Add execute shell option to the plugin
Version 1.23 - October 13, 2011
- Added configuration by views - see this wiki page for details
Version 1.22 - October 6, 2011
- Fixed JENKINS-11242 - Add configuration slicing for Email-ext plugin
Version 1.21 - September 22, 2011
- Fixed JENKINS-11094 - Add Email configuration slicer
Version 1.20 - August 24, 2011
- Fixed JENKINS-8194 - Discard Old Builds Slicer resets configuration of artifact keeping
- Fixed JENKINS-10797 - Sort "(Disabled)" properly
- improved navigation options
Version 1.19 - July 22, 2011
- Fixed JENKINS-10431 - do not create changes when there are no actual changes
- sort the index of slicers
- add newline to job names list to make it easier to cut and paste
Version 1.18 - July 2011
- Improved handling of chron specs with comments or multiple lines
- Fixed null pointer problem with timer slicers (previously would require reboot to pick up new slicer changes)
Version 1.17 - July 2011
- Complete redesign of the string slicer GUI (affects most slicers)
- Added custom workspace slicer
Version 1.15 - January 22, 2010
- Add Maven project slicing - MAVEN_OPTS and 'Goals and Settings' (report)
Version 1.14 - January 16, 2010
- Fix LogRotationSlicer to handle empty strings better (5240)
Version 1.13 - January 15, 2010
- Add Jdk slicer (report)
- Finally sort out release issues: The pom.xml for maven-hpi-plugin needed to point to a newer javanettasks
Version 1.12 - attempted January 15, 2010 - never released
Version 1.11 - attempted January 15, 2010 - never released
Version 1.10 - attempted November 2, 2009 and January 15, 2010 - never released
Version 1.9 - July 29, 2009
- No changes. Release was done to figure out case sensitivity issue in javanettasks 1.23
Version 1.8 - attempted July 22, 2009 - never released
Version 1.7 - attempted July 22, 2009 - never released
Version 1.6 - attempted July 21, 2009 and July 22, 2009 - never released
Version 1.5 - July 21, 2009
- Add log rotation slicers, for each of days and builds (report)
- Add SCM polling schedule slicer
- Add slave label slicer
Version 1.4 - attempted April 9, 2009 - never released
Version 1.3 - attempted April 9, 2009 - never released
Version 1.2 - March 16, 2009
- Initial release - supports slicing for timer trigger
29 Comments
mark1900 -
I have installed the Hudson Continuous Integration game plugin, which results in every project getting the checkbox boolean property to enable or disable the "Continuous Integration game". How would I use this "Configuration Slicing Plugin" to tick this "Continuous Integration game" checkbox for every project?
jminne -
To upgrade from 1.9 on linux I had to delete the ConfigurationSlicing files from the plugin directory. II thought this info might help some people. This issue sounds like this bug: http://issues.jenkins-ci.org/browse/JENKINS-5013 so I'm not opening a new one.
Unknown User (merten.schumann@asg.com)
The doc says
> It has a framework to make it very easy to add a configuration page for a new property.
where is the framework? I would like to add a configuration possibility to edit the "E-mail Notification" property ...
jswager -
Is it possible to "slice" slaves as well as jobs? The ability to change the label names associated with slaves would be a useful extension.
Zachary Young
I do not see this plugin in the Jenkins Plugin Manager. I'm running 1.472 and have been able to find this listed. Am I missing something?
Jacob Robertson
I'm not sure what is causing that. I just downloaded a fresh copy of 1.474 (the very latest) and ran a clean install, and then checked the available plugins, and this plugin was there.
Nickolay Rumyantsev
What is the license of this plugin? MIT?
Jacob Robertson
I do not see any licensing information anywhere in the source of this plugin.
Nickolay Rumyantsev
Is it possible to contribute to this project? I mean to add some new slicers.
If it is so how can I do it?
Jacob Robertson
Follow the source code link at the top of the page, and commit code to it. You should be able to figure out how to add new slicers by looking at the existing ones and finding the ones that are most like what you want to do. I see you have a JIRA ticket - just post here or to that ticket whenever you have changes you want me to release in the next version.
Nickolay Rumyantsev
Thanks for information
Nick Nick
Could you make clear about the email-ext slicer: I am able only to change the recipients list with this plugin, isn't I?
Thank you.
Jacob Robertson
That is correct. There is already an open ticket to request more features for this.
https://issues.jenkins-ci.org/browse/JENKINS-11774
Nick Nick
I am trying to create my own slicer based on BooleanSlicer. For practicing I have just copied jobdisabled bool slicer into newly created configurationslicing.jobdisabledclone package. The only changes I have made are replacements for slicer URL and slicer title. Unfortunately after compiling and installing plugin to my local Jenkins I dont see new slicer on the slicing page. In addition to cloning jobdisabled bool slicer I also tried to make my own boolean slicer for Workspace Cleanup plugin but stucked at the same obstacle.
I checked the list of loaded extension for Slicer class and didn't see my slicers. I have no idea why is it so because I used an @Extension annotation and also the compilation log shows that my slicer was indexed as Extension.
Could you suggest the solution?
Thank you.
Jacob Robertson
Some things to try - are you sure the behavior of "isLoaded" is correct? are the plugins you're trying to slice installed? Add some logging (using java.util.logging API) to check whether the slicers are being loaded. If you post your code I can review it - you can also email it to me if you like.
Nick Nick
Thanks for logging idea - I will try it.
As I saw in the code isLoaded method returns true in the BooleanSlicer class. I tried both to override and to leave it.
As I said I have made a clone so only three changes were performed.
This is the full code of clone class. It was placed in proper directory. Red color marks changes.(three 'clone' words were added)
Jacob Robertson
I followed exactly what you did, and I see that slicer showing up when I go to "Manage Jenkins > Configuration Slicing". Maybe you could check the .hpi file to see that the new class is really being compiled? Check in your workspace, and also in the plugins directory. Are you doing a clean install? Here is how I do my Jenkins testing - I have a batch file that I always run when I launch a local instance of Jenkins so I know that it contains the clean and newly compiled .hpi file. (I'm on windows)
Nick Nick
Finally I managed to do it. I used to install plugin by plain copying hpi package into the plugins directory and then restarting Jenkins.
Your phrase about a clean install gave me idea to alter my method. At first - delete old plugin files, then restart Jenkins, then load new hpi file via Jenkins GUI, then restart Jenkins again.
Frank Merrow
I updated hoping the new version would support slicing "Files to archive" under "Archive the artifacts" options.
No luck . . . If you take requests, please add it to your list.
I wish it was easier to add to, but my Maven skills are non-existent and I can only "get by" in Java . . . the discussions above did not enlighten me . . . I'd like to help, but I suspect I'd be a week just setting up the environment . . . seems like the actual programming involved is not that much though . . . maybe something to look at in my spare time on vacation. <wink>
Thanks for a super plugin!!
Frank
Jacob Robertson
Hi Frank. It will be much easier to keep track of your request if you fill out a JIRA ticket. If you follow the links near the top of the page it should be pretty easy to do.
Yoichi KODAMA
I add it to be able to choose SPACE in Choices. For example, I can choose 4 of the following.
' ' <= SPACE (default. NOT set an optional parameter)
'-t apple' <= (set an optional parameter)
'-t banana' <= (set an optional parameter)
'-t cinnamon' <= (set an optional parameter)
However, SPACE is deleted when I convert it in Parameters. Could you permit SPACE?
I can use String Parameter instead of Choices, but, in String Parameter, I may make a typo, and the input of the keyboard is troublesome.
Thanks!
YK
Jacob Robertson
I created a JIRA ticket for this. I've tested a simple fix, and will look at getting that code into the next release. https://issues.jenkins-ci.org/browse/JENKINS-19855
Yoichi KODAMA
Thank you for fixing it!
I confirmed that It works fine with ver. 1.38.3.
Thanks!
YK
Arun Shylaja
We have a Jenkins with around 80 jobs. I am trying to use 'Timer Trigger Slicer', to update the jobschedule time. But when i click save, I am getting the following exception. Please Help..
Arun Shylaja
It is working now.. I think someone upgraded the plugin or jenkins. I wish i could know what fixed it.
Steven Kitchen
Unable to Slice build timeout version 1.12.2. build timeout appears to have changed it's name to Jenkins build timeout plugin
Steven Kitchen
Still an issue with updates to:
build-timeout
1.12.2
configurationslicing
1.38.3
Nimi Sukumaran
Hi ,
I have Many jobs where I need to set my Build name using Build name setter plugin, Is there any way I can use configuration slicing to do the bulk changes instead of going to each job and do the configurations?
Or please let me know if I can go with any other methods for bulk configuration changes.
Mik Kal
Hi all, Any chance of a post-build action feature addition? To massively add post-build actions in jobs could save a lot of time.