@Test public void shouldCopyDockerfileFromDefaultLocation() throws IOException { File outputDir = folder.newFolder(); DockerFileUtil.copyDockerfileDirectory(TestLocalDockerFile.class, TestLocalDockerFile.class.getAnnotation(CubeDockerFile.class), outputDir); Assert.assertThat(new File(outputDir, "Dockerfile").exists(), Is.is(true)); }
public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output) throws IOException { if (cubeDockerFile == null) { throw new IllegalArgumentException("No CubeDockerFile annotation is provided"); } String dockerfilePath = resolveDockerfileLocation(containerObject, cubeDockerFile); copyDockerfileDirectoryFromClasspath(containerObject, dockerfilePath, output); }
DockerFileUtil { public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output) throws IOException { if (cubeDockerFile == null) { throw new IllegalArgumentException("No CubeDockerFile annotation is provided"); } String dockerfilePath = resolveDockerfileLocation(containerObject, cubeDockerFile); copyDockerfileDirectoryFromClasspath(containerObject, dockerfilePath, output); } }
DockerFileUtil { public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output) throws IOException { if (cubeDockerFile == null) { throw new IllegalArgumentException("No CubeDockerFile annotation is provided"); } String dockerfilePath = resolveDockerfileLocation(containerObject, cubeDockerFile); copyDockerfileDirectoryFromClasspath(containerObject, dockerfilePath, output); } private  DockerFileUtil(); }
DockerFileUtil { public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output) throws IOException { if (cubeDockerFile == null) { throw new IllegalArgumentException("No CubeDockerFile annotation is provided"); } String dockerfilePath = resolveDockerfileLocation(containerObject, cubeDockerFile); copyDockerfileDirectoryFromClasspath(containerObject, dockerfilePath, output); } private  DockerFileUtil(); static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output); }
DockerFileUtil { public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output) throws IOException { if (cubeDockerFile == null) { throw new IllegalArgumentException("No CubeDockerFile annotation is provided"); } String dockerfilePath = resolveDockerfileLocation(containerObject, cubeDockerFile); copyDockerfileDirectoryFromClasspath(containerObject, dockerfilePath, output); } private  DockerFileUtil(); static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output);  }