Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Added pipeline failures in wrapper, adjust log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Ray committed Sep 20, 2016
1 parent 87dd8bb commit 6e67d36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Expand Up @@ -199,7 +199,7 @@ public void perform(@Nonnull Run<?, ?> build, @Nonnull FilePath workspace, @Nonn
}

if (this.debugMode.equals(DebugMode.ENABLED)) {
logger.println("Consul URL for K/V Lookup: " + urlStringBuilder.toString());
logger.println("Consul " + this.requestMode.name() + " URL: " + urlStringBuilder.toString());
}

if (this.requestMode.equals(RequestMode.READ)) {
Expand Down
Expand Up @@ -5,6 +5,7 @@
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.AbstractProject;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.tasks.BuildWrapperDescriptor;
Expand Down Expand Up @@ -110,11 +111,14 @@ public void setUp(Context context, Run<?, ?> run, FilePath filePath, Launcher la
context.getEnv().get(read.getEnvKey())));
}
} catch (IOException ioe) {
logger.printf("IO exception was detected: %s%n", ioe);
run.setResult(Result.FAILURE);
listener.fatalError("IO exception was detected: %s%n", ioe);
} catch (ValidationException ve) {
logger.printf("Validation exception was detected: %s%n", ve);
run.setResult(Result.FAILURE);
listener.fatalError("Validation exception was detected: %s%n", ve);
} catch (ConsulRequestException cre) {
logger.printf("Consul request exception was detected: %s%n", cre);
run.setResult(Result.FAILURE);
listener.fatalError("Consul request exception was detected: %s%n", cre);
}
}
}
Expand Down

0 comments on commit 6e67d36

Please sign in to comment.