Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse successfully subbuilds from previous build [JENKINS-19524] #73

Merged
merged 6 commits into from
Oct 14, 2015
Merged

Reuse successfully subbuilds from previous build [JENKINS-19524] #73

merged 6 commits into from
Oct 14, 2015

Conversation

sshelomentsev
Copy link

@sshelomentsev sshelomentsev changed the title Add start build from failed phase (JENKINS-19524) Add start build from failed phase [JENKINS-19524] Sep 20, 2015
@sshelomentsev
Copy link
Author

Hi!
I've implemented a feature related to https://issues.jenkins-ci.org/browse/JENKINS-19524
In case of any phase ended with status FAILED, it provided an opportunity to reuse successfully completed sub jobs in the new build.

@sshelomentsev sshelomentsev changed the title Add start build from failed phase [JENKINS-19524] Reuse successfully subbuilds from previous build [JENKINS-19524] Sep 20, 2015
@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@emoshaya
Copy link

Definitely a great PR!! Hopefully this gets merged soon!

@rexim
Copy link

rexim commented Sep 22, 2015

👍

I hope this PR will be merged. :)


import java.io.IOException;

public class MultiJobResumeBuild implements ProminentProjectAction {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NiT: as I see the plugin mostly uses spaces for the tabulation. It would be better to follow this approach

@oleg-nenashev
Copy link
Member

I need only indicate the cause of the original build in the new build. Is it true, if a build started by a user or by a trigger, then cause will always be one?

Actually no. There may be many causes of different and/or similar types. A common example is Rebuild plugin, which adds an additional cause without modifying previous ones

hagzag added a commit that referenced this pull request Oct 14, 2015
Reuse successfully subbuilds from previous build [JENKINS-19524]
@hagzag hagzag merged commit 1382428 into jenkinsci:master Oct 14, 2015
@sshelomentsev
Copy link
Author

Hi @hagzag!
Thanks for merge my PR. When do you plan to release?

@emoshaya
Copy link

Hi @sshelomentsev
I have just tested this feature
I have a phase with 2 jobs, I have configured one of them to fail.
I see that after I fixed the cause of failure, the successful job from the previous run, is still being triggered and not reused.

what am I missing ?
Thanks

I have the same issue. Exactly how do we reuse the previous successful build? Is there a postbuild action we need to enable

@sshelomentsev
Copy link
Author

Hi @ebrahim-moshaya
I'm missing a clarification for ...
You can reuse successful build by clicking "resume builds" link in build page.
Image

@emoshaya
Copy link

Hi @sshelomentsev Thank you for the screenshot. Stupidly I was not using the plugin from your branch.. I need to rebuild the plugin to be able to use it. Thanks for your help!!

@emoshaya
Copy link

@sshelomentsev By the way, It would be really really nice if this plugin allowed for the build to pause after a certain phase waiting for manual promotion/resume. This would allow for phases requiring manual deployments to be included in the multijob. Unfortunately, we are having to use the promoted builds plugin in the multijob to trigger another job for deployment of the application. Unfortunately, this means the deployment job and post deployment jobs are missing from the visual pipeline and is not represented in the multijob phases. The workflow plugin already allows for a phase to pause and for it to resume following manual input.

@shacharbz
Copy link
Contributor

Hi @sshelomentsev

I have a problem with re-running a failed job
If my build is parameterized, the resumed build won't use the params I passed in the initial run.

@sshelomentsev
Copy link
Author

Hi @shacharbz
I found that I forgot about copying a parameters actions. Fix it now. Pull-request for it #77

@shacharbz
Copy link
Contributor

@sshelomentsev
Thanks for quick response! testing it now.

@shacharbz
Copy link
Contributor

works ok now, PR merged, Thanks again!

@dcendents
Copy link
Contributor

Any reason why we cannot resume an UNSTABLE build?

The way I configure my jobs, when a build is not STABLE, most of the time it is UNSTABLE and rarely FAILED.
i.e.: Some tests failed but otherwise the project did build correctly.

I don't mind doing a PR myself to add the feature, but maybe there's a good reason why it was not done this way?

I'd appreciate your input.

Thanks

@sshelomentsev
Copy link
Author

@dcendents
I missed the case for UNSTABLE build. It's because in our environment we handle FAILED or UNSTABLE build runtime and manually set status FAILURE by user action.
So, no reason not to make this.

@emoshaya
Copy link

emoshaya commented Feb 3, 2016

Hi The overall build below is red because child job Update Services - Cucumber Tests is red. I expected resuming this build will resume from the unstable or red child jobs. However, resuming this build restarts the build from the first Multijob phase API Gateway - Maven Build...

screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants