@Test public void dockerFileAndArchive() { BuildConfiguration config = new BuildConfiguration.Builder(). dockerArchive("this"). dockerFile("that").build(); try { config.validate(); } catch (IllegalArgumentException expected) { return; } fail("Should have failed."); }
public String validate() throws IllegalArgumentException { if (entryPoint != null) { entryPoint.validate(); } if (cmd != null) { cmd.validate(); } if (healthCheck != null) { healthCheck.validate(); } if ((dockerFile != null || contextDir != null) && dockerArchive != null) { throw new IllegalArgumentException("Both <dockerFile> (<dockerFileDir>) and <dockerArchive> are set. " + "Only one of them can be specified."); } if (healthCheck != null) { return "1.24"; } else if (args != null) { return "1.21"; } else { return null; } }
BuildConfiguration implements Serializable { public String validate() throws IllegalArgumentException { if (entryPoint != null) { entryPoint.validate(); } if (cmd != null) { cmd.validate(); } if (healthCheck != null) { healthCheck.validate(); } if ((dockerFile != null || contextDir != null) && dockerArchive != null) { throw new IllegalArgumentException("Both <dockerFile> (<dockerFileDir>) and <dockerArchive> are set. " + "Only one of them can be specified."); } if (healthCheck != null) { return "1.24"; } else if (args != null) { return "1.21"; } else { return null; } } }
BuildConfiguration implements Serializable { public String validate() throws IllegalArgumentException { if (entryPoint != null) { entryPoint.validate(); } if (cmd != null) { cmd.validate(); } if (healthCheck != null) { healthCheck.validate(); } if ((dockerFile != null || contextDir != null) && dockerArchive != null) { throw new IllegalArgumentException("Both <dockerFile> (<dockerFileDir>) and <dockerArchive> are set. " + "Only one of them can be specified."); } if (healthCheck != null) { return "1.24"; } else if (args != null) { return "1.21"; } else { return null; } } BuildConfiguration(); }
BuildConfiguration implements Serializable { public String validate() throws IllegalArgumentException { if (entryPoint != null) { entryPoint.validate(); } if (cmd != null) { cmd.validate(); } if (healthCheck != null) { healthCheck.validate(); } if ((dockerFile != null || contextDir != null) && dockerArchive != null) { throw new IllegalArgumentException("Both <dockerFile> (<dockerFileDir>) and <dockerArchive> are set. " + "Only one of them can be specified."); } if (healthCheck != null) { return "1.24"; } else if (args != null) { return "1.21"; } else { return null; } } BuildConfiguration(); boolean isDockerFileMode(); File getDockerFile(); File getDockerArchive(); File getContextDir(); String getFilter(); String getDockerFileRaw(); String getContextDirRaw(); Arguments getShell(); String getDockerArchiveRaw(); String getDockerFileDirRaw(); String getFilterRaw(); String getFrom(); Map<String, String> getFromExt(); String getRegistry(); String getMaintainer(); String getWorkdir(); AssemblyConfiguration getAssemblyConfiguration(); List<String> getPorts(); String getImagePullPolicy(); List<String> getVolumes(); List<String> getTags(); Map<String, String> getEnv(); Map<String, String> getLabels(); Arguments getCmd(); String getCleanupMode(); Boolean getNoCache(); Boolean getOptimise(); Boolean getSkip(); ArchiveCompression getCompression(); Map<String, String> getBuildOptions(); Arguments getEntryPoint(); List<String> getRunCmds(); String getUser(); HealthCheckConfiguration getHealthCheck(); Map<String, String> getArgs(); boolean optimise(); @Deprecated String getCommand(); String getCleanup(); boolean nocache(); CleanupMode cleanupMode(); File getAbsoluteContextDirPath(String sourceDirectory, String projectBaseDir); File getAbsoluteDockerFilePath(String sourceDirectory, String projectBaseDir); File getAbsoluteDockerTarPath(String sourceDirectory, String projectBaseDir); String initAndValidate(KitLogger log); String validate(); File calculateDockerFilePath(); }
BuildConfiguration implements Serializable { public String validate() throws IllegalArgumentException { if (entryPoint != null) { entryPoint.validate(); } if (cmd != null) { cmd.validate(); } if (healthCheck != null) { healthCheck.validate(); } if ((dockerFile != null || contextDir != null) && dockerArchive != null) { throw new IllegalArgumentException("Both <dockerFile> (<dockerFileDir>) and <dockerArchive> are set. " + "Only one of them can be specified."); } if (healthCheck != null) { return "1.24"; } else if (args != null) { return "1.21"; } else { return null; } } BuildConfiguration(); boolean isDockerFileMode(); File getDockerFile(); File getDockerArchive(); File getContextDir(); String getFilter(); String getDockerFileRaw(); String getContextDirRaw(); Arguments getShell(); String getDockerArchiveRaw(); String getDockerFileDirRaw(); String getFilterRaw(); String getFrom(); Map<String, String> getFromExt(); String getRegistry(); String getMaintainer(); String getWorkdir(); AssemblyConfiguration getAssemblyConfiguration(); List<String> getPorts(); String getImagePullPolicy(); List<String> getVolumes(); List<String> getTags(); Map<String, String> getEnv(); Map<String, String> getLabels(); Arguments getCmd(); String getCleanupMode(); Boolean getNoCache(); Boolean getOptimise(); Boolean getSkip(); ArchiveCompression getCompression(); Map<String, String> getBuildOptions(); Arguments getEntryPoint(); List<String> getRunCmds(); String getUser(); HealthCheckConfiguration getHealthCheck(); Map<String, String> getArgs(); boolean optimise(); @Deprecated String getCommand(); String getCleanup(); boolean nocache(); CleanupMode cleanupMode(); File getAbsoluteContextDirPath(String sourceDirectory, String projectBaseDir); File getAbsoluteDockerFilePath(String sourceDirectory, String projectBaseDir); File getAbsoluteDockerTarPath(String sourceDirectory, String projectBaseDir); String initAndValidate(KitLogger log); String validate(); File calculateDockerFilePath(); static final String DEFAULT_FILTER; static final String DEFAULT_CLEANUP; }