in src/main/java/com/amazonaws/codepipeline/jenkinsplugin/Validation.java [66:115]
public static void validatePlugin(
final String awsAccessKey,
final String awsSecretKey,
final String region,
final String actionTypeCategory,
final String actionTypeProvider,
final String actionTypeVersion,
final String projectName,
final TaskListener taskListener) {
boolean canThrow = false;
String allErrors = LINE_SEPARATOR + "AWS CodePipeline Jenkins plugin setup error. One or more required configuration parameters have not been specified.";
if (!actionTypeIsValid(actionTypeCategory, actionTypeProvider, actionTypeVersion)) {
final String error = "ActionType: " +
"Category: " + actionTypeCategory +
", Provider: " + actionTypeProvider +
", Version: " + actionTypeVersion +
".";
LoggingHelper.log(taskListener, error);
allErrors += LINE_SEPARATOR + error;
canThrow = true;
}
if (!credentialsAreValid(awsAccessKey, awsSecretKey)) {
final String error = "The AWS credentials provided are not valid.";
allErrors += LINE_SEPARATOR + error;
canThrow = true;
}
if (!regionIsValid(region)) {
final String error = "The specified AWS region is not valid.";
allErrors += LINE_SEPARATOR + error;
canThrow = true;
}
if (!projectNameIsValid(projectName)) {
final String error = "Invalid project name: " + projectName + ". The AWS CodePipeline Jenkins plugin supports project names with a maximum of " + MAX_PROJECT_NAME_LENGTH +
" characters. Allowed characters include alphanumeric characters and the special characters - (minus sign) and _ (underscore).";
allErrors += LINE_SEPARATOR + error;
LoggingHelper.log(taskListener, error);
canThrow = true;
}
if (canThrow) {
throw new hudson.model.Failure(allErrors);
}
}