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

JENKINS-27284: Constrain build result severity #95

Merged
merged 3 commits into from Nov 17, 2016

Conversation

Projects
None yet
2 participants
@dobbymoodge
Copy link

commented Nov 14, 2016

This change adds a per-job setting to constrain the build result
nastiness set by the plugin for problems that occur inside the plugin.
That is, an S3 failure that would normally result in a FAILURE can
be constrained to UNSTABLE or SUCCESS.

This addresses JENKINS-27284
https://issues.jenkins-ci.org/browse/JENKINS-27284 by providing a
way to prevent S3 plugin failures from causing an otherwise successful
build to be marked as having failed.

JENKINS-27284: Constrain build result severity
This change adds a per-job setting to constrain the build result
nastiness set by the plugin for problems that occur inside the plugin.
That is, an S3 failure that would normally result in a FAILURE can
be constrained to UNSTABLE or SUCCESS.

This addresses JENKINS-27284
<https://issues.jenkins-ci.org/browse/JENKINS-27284> by providing a
way to prevent S3 plugin failures from causing an otherwise successful
build to be marked as having failed.
@dobbymoodge

This comment has been minimized.

Copy link
Author

commented Nov 14, 2016

This supersedes #53

@@ -69,6 +70,7 @@ public S3BucketPublisher(String profileName, List<Entry> entries, List<MetadataP

this.dontWaitForConcurrentBuildCompletion = dontWaitForConcurrentBuildCompletion;
this.consoleLogLevel = parseLevel(consoleLogLevel);
this.pluginFailureResultConstraint = Result.fromString(pluginFailureResultConstraint);

This comment has been minimized.

Copy link
@Jimilian

Jimilian Nov 15, 2016

If I remember correctly, default value for pluginFailureResultConstraint would be null (for users who just updated plugin). Please, adjust default value to keep backward compatibility.

This comment has been minimized.

Copy link
@dobbymoodge

dobbymoodge Nov 15, 2016

Author

@Jimilian How this latest commit?

@@ -236,9 +259,9 @@ public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath ws, @Nonnull Launc
run.addAction(new S3ArtifactsAction(run, profile, artifacts));
run.addAction(new FingerprintAction(run, record));
}
} catch (IOException e) {
} catch (Exception e) { // Any failure in this plugin should be constrained according to config

This comment has been minimized.

Copy link
@Jimilian

Jimilian Nov 16, 2016

Why do you need to suppress InterruptedException? It could break a lot of stuff. Because it would continue execution then it's not desired.
If build was interrupted by Jenkins (i.e. aborted from timeout plugin, executor was stopped from UI, etc.), it doesn't have chance to pass (at least I can't imagine such case).

This comment has been minimized.

Copy link
@dobbymoodge

dobbymoodge Nov 16, 2016

Author

How about now?

@Jimilian Jimilian merged commit 21bc5a6 into jenkinsci:master Nov 17, 2016

1 check passed

Jenkins This pull request looks good
Details
@Jimilian

This comment has been minimized.

Copy link

commented Nov 17, 2016

Great. Thanks you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.