writeBuildpackContent() — spring-boot Function Reference
Architecture documentation for the writeBuildpackContent() function in BootBuildImageIntegrationTests.java from the spring-boot codebase.
Entity Profile
Dependency Diagram
graph TD 23692607_70a7_83d3_84ec_4284b10a45fb["writeBuildpackContent()"] 08c15059_8d06_deba_60d1_38fc914b7eac["buildsImageWithBuildpackFromDirectory()"] 08c15059_8d06_deba_60d1_38fc914b7eac -->|calls| 23692607_70a7_83d3_84ec_4284b10a45fb 606662c0_6bc0_19e8_fd7a_55751c6386f3["buildsImageWithBuildpackFromTarGzip()"] 606662c0_6bc0_19e8_fd7a_55751c6386f3 -->|calls| 23692607_70a7_83d3_84ec_4284b10a45fb style 23692607_70a7_83d3_84ec_4284b10a45fb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
build-plugin/spring-boot-gradle-plugin/src/dockerTest/java/org/springframework/boot/gradle/tasks/bundling/BootBuildImageIntegrationTests.java lines 617–651
private void writeBuildpackContent() throws IOException {
FileAttribute<Set<PosixFilePermission>> dirAttribute = PosixFilePermissions
.asFileAttribute(PosixFilePermissions.fromString("rwxr-xr-x"));
FileAttribute<Set<PosixFilePermission>> execFileAttribute = PosixFilePermissions
.asFileAttribute(PosixFilePermissions.fromString("rwxrwxrwx"));
File buildpackDir = new File(this.gradleBuild.getProjectDir(), "buildpack/hello-world");
Files.createDirectories(buildpackDir.toPath(), dirAttribute);
File binDir = new File(buildpackDir, "bin");
Files.createDirectories(binDir.toPath(), dirAttribute);
File descriptor = new File(buildpackDir, "buildpack.toml");
try (PrintWriter writer = new PrintWriter(new FileWriter(descriptor))) {
writer.println("api = \"0.10\"");
writer.println("[buildpack]");
writer.println("id = \"example/hello-world\"");
writer.println("version = \"0.0.1\"");
writer.println("name = \"Hello World Buildpack\"");
writer.println("homepage = \"https://github.com/buildpacks/samples/tree/main/buildpacks/hello-world\"");
writer.println("[[stacks]]\n");
writer.println("id = \"*\"");
}
File detect = Files.createFile(Paths.get(binDir.getAbsolutePath(), "detect"), execFileAttribute).toFile();
try (PrintWriter writer = new PrintWriter(new FileWriter(detect))) {
writer.println("#!/usr/bin/env bash");
writer.println("set -eo pipefail");
writer.println("exit 0");
}
File build = Files.createFile(Paths.get(binDir.getAbsolutePath(), "build"), execFileAttribute).toFile();
try (PrintWriter writer = new PrintWriter(new FileWriter(build))) {
writer.println("#!/usr/bin/env bash");
writer.println("set -eo pipefail");
writer.println("echo \"---> Hello World buildpack\"");
writer.println("echo \"---> done\"");
writer.println("exit 0");
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does writeBuildpackContent() do?
writeBuildpackContent() is a function in the spring-boot codebase.
What calls writeBuildpackContent()?
writeBuildpackContent() is called by 2 function(s): buildsImageWithBuildpackFromDirectory, buildsImageWithBuildpackFromTarGzip.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free