@Override
	public boolean validate(WorkflowContext context) throws HyscaleException {
	    logger.debug("Starting registry validation");
	    Image image = context.getServiceSpec().get(HyscaleSpecFields.image, Image.class);
	    String registry = image.getRegistry();

	    if (validRegistries.contains(registry)) {
	        return true;
	    }
	    
	    if (inValidRegistries.contains(registry)) {
	        return false;
	    }
		if (!ImageUtil.isImageBuildPushRequired(context.getServiceSpec())) {
			return true;
		}
		boolean isRegistryAvailable = registryManager.getImageRegistry(registry) != null ? true : false;
		if (isRegistryAvailable) {
			validRegistries.add(registry);
			return true;
		} else {
		    inValidRegistries.add(registry);
		}
		registry=registry!=null?registry:"";
		WorkflowLogger.persist(ValidatorActivity.MISSING_DOCKER_REGISTRY_CREDENTIALS, LoggerTags.ERROR, registry, registry);
		if(WorkflowLogger.isDisabled()){
			outputHandler.addErrorMessage(ImageBuilderErrorCodes.MISSING_DOCKER_REGISTRY_CREDENTIALS.getMessage(),registry, registry);
		}
		return false;
	}
1. It will check that spec has buildspec or dockerfile 
2. If both is not then it will return true
3. If any one is there then 
   3.1  It will fetch registry details
   3.2  Then it will verify the registry
   3.3  if registry is exist which is provided by user then return true else false
workflow-controller/controller-service/src/main/java/io/hyscale/controller/validator/impl/RegistryValidator.java