logger.info("[{}] The build directory is not specified. Will use a temporary one {}", imageName, buildDirectory); buildDirectory = DirectoryTools.pathTrailingSlash(buildDirectory); ctx.setBuildDirectory(buildDirectory); String absoluteAssetPath = buildDirectory + assetPath; String content = assetPathAndContent.getB(); DirectoryTools.createPathToFile(absoluteAssetPath); FileTools.writeFile(content, absoluteAssetPath); DirectoryTools.createPath(buildDirectory + assetsFolderPath); String absoluteAssetPath = buildDirectory + assetPath; String content = assetRelativePathAndContent.getB(); DirectoryTools.createPathToFile(absoluteAssetPath); FileTools.writeFile(content, absoluteAssetPath); String absoluteAssetPath = buildDirectory + assetPath; byte[] content = assetRelativePathAndContent.getB(); DirectoryTools.createPathToFile(absoluteAssetPath); FileTools.writeFile(content, absoluteAssetPath);
@Override protected void getDefinition(SimpleResourceEditorDefinition simpleResourceEditorDefinition) { simpleResourceEditorDefinition.addInputText(AttachableVolume.PROPERTY_HOST_FOLDER, fieldConfig -> { fieldConfig.addFormator(value -> { if (Strings.isNullOrEmpty(value)) { return null; } value = CommonFormatting.trimSpacesAround(value); value = DirectoryTools.cleanupDots(value); return value; }); fieldConfig.setConvertFromString(value -> value == null ? null : value); }); simpleResourceEditorDefinition.addInputText(AttachableVolume.PROPERTY_CONTAINER_FOLDER, fieldConfig -> { fieldConfig.addFormator(value -> { if (Strings.isNullOrEmpty(value)) { return null; } value = CommonFormatting.trimSpacesAround(value); value = DirectoryTools.cleanupDots(value); return value; }); fieldConfig.addValidator(CommonValidation::validateNotNullOrEmpty); fieldConfig.setConvertFromString(value -> value == null ? null : value); }); }