in src/main/java/com/microsoft/jenkins/appservice/commands/DockerBuildCommand.java [52:70]
private FilePath findDockerFile(FilePath workspace, String pattern) throws AzureCloudException {
try {
final FilePath[] files = workspace.list(pattern);
if (files.length > 1) {
throw new AzureCloudException("Multiple Dockerfile found in the specified path.");
} else if (files.length == 0) {
throw new AzureCloudException("No Dockerfile found in the specific path.");
}
final FilePath dockerfile = files[0];
if (!dockerfile.exists()) {
throw new AzureCloudException("Dockerfile cannot be found:" + pattern);
}
return dockerfile;
} catch (IOException | InterruptedException e) {
throw new AzureCloudException(e);
}
}