rohankanojia

Untitled

Mar 7th, 2018
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1.     public static ImageConfiguration getDefaultImageConfiguration(MavenProject project, String defaultImageName) {
  2.         if(defaultImageName == null || defaultImageName.isEmpty()) {
  3.             defaultImageName = project.getGroupId() + "/" + project.getArtifactId() + ":" +
  4.                     project.getVersion();
  5.         }
  6.         ImageConfiguration imageConfiguration = new ImageConfiguration.Builder()
  7.                 .name(defaultImageName)
  8.                 .buildConfig(new BuildImageConfiguration.Builder()
  9.                         .dockerFileDir("src/main/docker")
  10.                         .build())
  11.                 .build();
  12.         return imageConfiguration;
  13.     }
Add Comment
Please, Sign In to add comment