Help us shape the future of Go! Take the 2026 Go Developer Survey

finalize

package
v1.5.2-0...-36bfd17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(f *Finalizer) error

Run performs the finalize phase

Types

type Finalizer

type Finalizer struct {
	Stager        common.Stager
	Manifest      common.Manifest
	Installer     common.Installer
	Log           *libbuildpack.Logger
	Command       common.Command
	Container     containers.Container
	JRE           jres.JRE
	ContainerName string
	JREName       string
	BuildpackDir  string
}

func NewFinalizer

func NewFinalizer(stager common.Stager, manifest common.Manifest,
	installer common.Installer, logger *libbuildpack.Logger,
	command common.Command) (*Finalizer, error)

NewFinalizer creates a Finalizer by reading the config.yml written by the supply phase. This follows the pattern established by go-buildpack and dotnet-core-buildpack.

func (*Finalizer) InstallJavaexecLauncher

func (f *Finalizer) InstallJavaexecLauncher() error

InstallJavaexecLauncher copies the javaexec launcher binary into the dependency directory so it is present in the droplet at runtime. The start command (see containers.JavaExecCommand) invokes it as $DEPS_DIR/<idx>/bin/javaexec to tokenize JAVA_OPTS without a shell.

Source path resolution (first match wins):

  1. JAVAEXEC_BINARY_PATH env var — set by bin/finalize for source/git usage where javaexec is built into a temp dir alongside the finalize binary.
  2. <buildpackDir>/bin/javaexec — present in packaged buildpacks built by scripts/build.sh.

The binary is required: missing it means the generated start command would fail at launch, so this returns an error rather than continuing.

type SupplyConfig

type SupplyConfig struct {
	Container  string `yaml:"container"`
	JRE        string `yaml:"jre"`
	JREVersion string `yaml:"jre_version"`
	JavaHome   string `yaml:"java_home"`
}

SupplyConfig holds the values written to config.yml by the supply phase.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL