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

dobbymoodge
Copy link

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.

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
Copy link
Author

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);

Choose a reason for hiding this comment

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

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.

Copy link
Author

Choose a reason for hiding this comment

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

@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

Choose a reason for hiding this comment

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

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).

Copy link
Author

Choose a reason for hiding this comment

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

How about now?

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

Great. Thanks you!

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.

2 participants