Skip to end of metadata
Go to start of metadata

Plugin Information

View Rebuilder on the plugin site for more information.

This plug-in allows the user to rebuild a parametrized build without entering the parameters again.It will also allow the user to edit the parameters before rebuilding.

Usage

Once you installed this plug-in whenever you execute a parametrized build you will get a rebuild button in the left pane of the run as shown in the image. If you want to execute the build with same parameters, rebuild plug-in will allow you to build it through rebuild button.If you want to edit some of the existing parameters, the rebuild plug-in will allow you to edit the existing parameters and build it.

How to rebuild

Steps to rebuild

  • Select the run of the job which you want to rerun.
  • There will be a Rebuild button as shown in the image given below.
  • Click on the Rebuild button. A configuration page contains the existing parameters will appear as shown in the below image.
  • If you want to edit some existing parameters(for ex: name and choice) , you can edit it and Rebuild it by clicking the Rebuild button.

Change Log

Version 1.28 (Mar 28, 2018)

  • Updated required Jenkins Core to 1.642.3
  • Additional Null-checks
  • Fix root-url
  • Handle NodeParameters correctly

Version 1.27 (Oct 18, 2017)

* Display more informative error messages

* Ensure inherited parameters are added to rebuilds

Version 1.25 (Jun 25, 2015)

*Add option to disable the rebuild plugin on the project level

Version 1.20 (Sept 13, 2013)

*Fixed JENKINS-15882.

*Fixed JENKINS-14828.

*Blocked rebuilding matrix configuration alone.

*Rebuild option for parameter less build.

Version 1.18 (Feb 24, 2013)

* Fix JENKINS-16874 - java.lang.NullPointerException: Current Project is null

Version 1.17 (Feb 06, 2013)

*"Rebuild Last"  feature allows to rebuild last build implemented.

* JENKINS-14905 fixed.

Version 1.16 (Nov 14, 2012)

*Rebuild support for non parametrized build
    implemented.

Version 1.16 (Nov 14, 2012)

*Rebuild support for non parametrized build
    implemented.

*Required Jenkins Core Version is 1.481.

Version 1.15 (Oct 12, 2012)

*Rebuild support for jobs having subversion/text parameter
    implemented.

*Required Jenkins Core Version is 1.481.

Version 1.14 (July 8, 2012)

* fix JENKINS-11770 add support for NodeLabel parameter plugin

Version 1.13 (June 11, 2012)

* Enabled rebuild plugin support for parametrized triggered plugin with basic type of parameters like String-parameter,Boolean-parameter,
  File-parameter,Text-parameter and Password-parameter. Currently there is no support for Run-parameter for Parametrized triggered plugin.

* Disabled the rebuild option for sub jobs of matrix build.

Version 1.12 (June 06, 2012)

* Fix reponed JENKINS-13647

Version 1.11 (May 13, 2012)

* Fix NullPointerException for JENKINS-13647

Version 1.7 (Mar 2, 2011)

  • Enhanced the rebuild plug-in so that the editing option of build parameters before rebuild is introduced. [Doesnt have backward compatibility. An exception at startup. Seems minor and e are working on fix however doesnt affect functionality]

Version 1.4 (Sept 15, 2010)

  • Disabling the rebuild option while selecting Run and File parameters is implemented

Version 1.1 (Jul 16, 2010)

26 Comments

  1. Does this include SCM parameters for example the perforce change-list / subversion change list ?

    Or does this only record parameters passed to the build on the latest code ?

  2. If the job/build being rebuilt includes a Copy Artifact build selector parameter, an exception will be generated.  Some snippets of the exception:

    java.lang.IllegalArgumentException: Failed to instantiate class hudson.plugins.copyartifact.BuildSelector from {"name":"TARGETBUILD","value":"1<\/buildNumber><\/SpecificBuildSelector>"} at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:397)

    Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class hudson.plugins.copyartifact.BuildSelector
    at org.kohsuke.stapler.RequestImpl.loadConstructorParamNames(RequestImpl.java:510)

  3. I have a job that uses a validating string parameter field (see plugin Validating String Parameter Plugin.
    This generates the stacktrace below when using the Rebuild action:

    Status Code: 500

    Exception:
    Stacktrace:org.apache.commons.jelly.JellyTagException: file:/home/hudson/hudson_home/plugins/rebuild/WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/index.jelly:54:63:  No page found 'ValidatingStringParameterValue.jelly' for class com.sonyericsson.rebuild.RebuildAction
            at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:124)
            at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)

    Looks like it's due to copies of the jelly files stored in the rebuild plugin itself,
    instead of the originals.
    ./WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/RunParameterValue.jelly
    ./WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/StringParameterValue.jelly
    ./WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/FileParameterValue.jelly
    ./WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/BooleanParameterValue.jelly
    ./WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/index.jelly
    ./WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/PasswordParameterValue.jelly
    I tried to copy StringParameterValue.jelly to ValidatingStringParameterValue.jelly
    but get still the same error, perhaps I need to restart Jenkins?
    Is there a better fix for this?

  4. All, I'm using version 1.8 of this plugin in Jenkins 1.410, with the "parameterized build" plugin (version 2.8).  When I try and rebuild a job, I see all the parameters as expected, but when I hit "build", I get a 500 error and the following NullPointerException:java.lang.NullPointerException
    at com.sonyericsson.rebuild.RebuildAction.doConfigSubmit(RebuildAction.java:138)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:373)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
    at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:373)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
    at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
    at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
    at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
    at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
    at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
    at java.lang.Thread.run(Thread.java:662)

    Thanks in advance!

  5. Sorry for a delayed response due to holidays. Please fill JIRA issues against the problems you face and we will be looking into this soon. If already filed in JIRA, ignore. I will update my inputs in JIRA soon.

  6. I setup the plugin and I could not find the "Rebuild" option. Am I missing anything? This is what I could see in the left part.

    And I've installed the plugin. This is whats displayed in my installed plugins view:

    Am I missing anything? I am using the Jenkins version 1.428. I've configured Build pipeline plugin for Jenkins, will that have any impact?

    Thanks,

    Leena

    1. Its showing the "Rebuild" option for the build that happened after installing the plugin. I was under the impression that the it will be shown for the earlier builds also.  Sorry for the false alarm.

  7. Hello,

    Can someone tell me is this a expected behavior?

    I am using Role Based Strategy(Role Strategy Plugin) for authentication, even if a user don't have permissions to build a job he is able to see 'REBUILD' option and able to run job.

    What I am expecting is when user don't have build permissions then user shouldn't see 'REBUILD' option, is this something doable?

    Thank you,

    MS

  8. m l

    Hi,

    Any chance you could add support for label parameters, as provided by the NodeLabel Parameter Plugin. I think this just requires that you add a LabelParameterValue.jelly file with content:

    <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define"
            xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"
            xmlns:i="jelly:fmt" xmlns:p="/lib/hudson/project">
        <f:entry title="${it.name}" description="${it.description}">
            <div name="parameter" description="${it.description}">
                <input type="hidden" name="name" value="${it.name}" />
                <f:textbox name="label" value="${it.label}" />
            </div>
        </f:entry>
    </j:jelly>
    

    Many thanks.

  9. Hi, please can you add newer releases to your download location? http://hudson-ci.org/download/plugins/rebuild/ I cannot install it directly from jenkins, because its behind firewall, thx a lot.

  10. ListSubversionTagsParameterValue, how can i support?

  11. Hi. After jenkins upgrade, I'm getting following error when press on rebuild button:

    Exception: org.apache.commons.jelly.JellyTagException:  file:/var/lib/jenkins/plugins/rebuild/WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/index.jelly:54:63:  <st:include> No page found 'TextParameterValue.jelly' for class  com.sonyericsson.rebuild.RebuildAction
    Stacktrace:javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: file:/var/lib/jenkins/plugins/rebuild/WEB-INF/classes/com/sonyericsson/rebuild/RebuildAction/index.jelly:54:63: <st:include> No page found 'TextParameterValue.jelly' for class com.sonyericsson.rebuild.RebuildAction
    	at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:112)
    ...
    

    I've fixed that with cp StringParameterValue.jelly TextParameterValue.jelly, but I'm not sure, that's the right way to do it. I think it all started after upgrade 1.467->1.477.

  12. Any chance to support MavenMetadataParameterValue?

  13. Hi, could you enhance parameterized.jelly file to show a textbox with the value pre-populated for parameters that are not supported by the rebuild plugin? I think that is a simple change and I can provide a patch if required. That way there is no need to update this plugin every time some one develops a new custom parameter plugin. 

  14. if I need to change the parameter before it shows the rebuild screen how can i do that?

  15. So far, this plugin hasn't been very helpful.  Too many bugs.  It doesn't always reload every parameter you see on the parameter page.  Especially predefined parameters from triggering parameterized builds.  Also seems to have trouble with SVN parameters.  Has trouble with parameters loaded by other parameters/envs.  Sometimes shows two Rebuild links.

  16. Hi ,

     if changing the the job-parameter (add a new parameter) between the original build and the rebuild the plugin will fail with an exception.

    So is this not possible extend this plugin with an option to use for not defined values the default values of the concerning parameter?

    Is there somthing planned in the future?

  17. is this possible  to find out from an internal state or envirment varaibel  to detect in the environment preparation that is an rebuild and make some things other.

    for example resync some files to an older state or similar action to prepare the same preconditions?

    On the enviroment vars i found nothing, but ihave installed the groovy plugins is there a way to find it out?

    Thanks

    Ingo

  18. Is there a way to rebuild using Jenkins cli ?

  19. pipeline mode not show "Rebuild Last"  link, but normal Job is OK. why?

    1. my jenkins is "2.83", and rebuild plugin is  1.27

  20. It's possible to rebuild a non parametrized job with this plugin and keep the same context such as the Git Branch and Env params ?

  21. Hi, I would like to change dynamically a parameter default value depending on if it's a new build or a rebuild. Is there a way? Like an environment variable that is different when it's a rebuild and I could check it? Thanks.

  22. I also have this problem: when I click "Rebuild", parameters using the Extended Choice Parameter plugin or Active Choices Plugin are showing as strings instead of drop-down lists. Any solution to this?

Write a comment…