Documentation
¶
Index ¶
- func Build(config Configuration, configParser ConfigParser, sbomGenerator SBOMGenerator, ...) packit.BuildFunc
- func Detect(config Configuration, logger scribe.Emitter, configParser ConfigParser, ...) packit.DetectFunc
- type BuildPlanMetadata
- type ConfigParser
- type Configuration
- type ProjectFileParser
- type ProjectParser
- type RuntimeConfig
- type RuntimeConfigParser
- type SBOMGenerator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build( config Configuration, configParser ConfigParser, sbomGenerator SBOMGenerator, logger scribe.Emitter, clock chronos.Clock, ) packit.BuildFunc
Build will return a packit.BuildFunc that will be invoked during the build phase of the buildpack lifecycle.
Build generates a SBOM of the .NET app's dependencies based on its compiled DLLs. It sets up the entrypoint for the app image and adds a helper that will determine at launch-time which container port the app should listen on.
func Detect ¶
func Detect( config Configuration, logger scribe.Emitter, configParser ConfigParser, projectParser ProjectParser, ) packit.DetectFunc
Detect will return a packit.DetectFunc that will be invoked during the detect phase of the buildpack lifecycle.
Detection will contribute a Build Plan that requires different things depending on the type of app being built. See Configuration for details on how environment variable configuration influences detection.
Source Code Apps ¶
The buildpack will require .NET Core ASP.NET Runtime at launch-time. It will require ICU at launch time. It will require Nodejs at launch time if the app relies on JavaScript components.
Framework-dependent Deployments ¶
The buildpack will require the .NET Core ASP.NET Runtime at launch-time to run the framework-dependent app. It will require ICU at launch time. It will require Nodejs if the app relies on JavaScript components.
Framework-dependent Executables ¶
The buildpack will require the .NET Core ASP.NET Runtime at launch-time to run the framework-dependent app. It will require ICU at launch time. It will require Nodejs at launch time if the app relies on JavaScript components.
Self-contained Executables The buildpack will require ICU at launch time. It will require Nodejs at launch time if the app relies on JavaScript components.
Types ¶
type BuildPlanMetadata ¶ added in v0.11.1
type ConfigParser ¶ added in v0.1.0
type ConfigParser interface {
Parse(glob string) (RuntimeConfig, error)
}
type Configuration ¶ added in v0.11.0
type Configuration struct { // When BP_DEBUG_ENABLED=TRUE, the buildpack will include the Visual Studio // Debugger in the app launch image Remote debuggers can invoke vsdbg inside // the running app container and attach to vsdbg's exposed port; also, the // buildpack will set ASPNETCORE_ENVIRONMENT=Development. DebugEnabled bool `env:"BP_DEBUG_ENABLED"` // When BP_LIVE_RELOAD_ENABLED=TRUE, the buildpack will make the app's entrypoint // process reload on changes to program files in the app container. It will // include watchexec in the app launch image and make the default container // entrypoint watchexec + <the usual app entrypoint>. See // https://github.com/watchexec/watchexec for more on watchexec as a // reloadable process manager. LiveReloadEnabled bool `env:"BP_LIVE_RELOAD_ENABLED"` // BP_LOG_LEVEL determines the amount of logs produced by the buildpack. Set // BP_LOG_LEVEL=DEBUG for more detailed logs. LogLevel string `env:"BP_LOG_LEVEL,default=INFO"` // When BP_DOTNET_PROJECT_PATH is set to a relative path, the buildpack // will look for project file(s) in that subdirectory to determine which // project to build into the app container. ProjectPath string `env:"BP_DOTNET_PROJECT_PATH"` }
Configuration enumerates the environment variable configuration options that govern the buildpack's behaviour.
type ProjectFileParser ¶ added in v0.1.0
type ProjectFileParser struct{}
func NewProjectFileParser ¶ added in v0.1.0
func NewProjectFileParser() ProjectFileParser
func (ProjectFileParser) FindProjectFile ¶ added in v0.3.0
func (p ProjectFileParser) FindProjectFile(path string) (string, error)
func (ProjectFileParser) NPMIsRequired ¶ added in v0.1.0
func (p ProjectFileParser) NPMIsRequired(path string) (bool, error)
func (ProjectFileParser) NodeIsRequired ¶ added in v0.1.0
func (p ProjectFileParser) NodeIsRequired(path string) (bool, error)
type ProjectParser ¶ added in v0.1.0
type RuntimeConfig ¶ added in v0.1.0
type RuntimeConfigParser ¶ added in v0.1.0
type RuntimeConfigParser struct{}
func NewRuntimeConfigParser ¶ added in v0.1.0
func NewRuntimeConfigParser() RuntimeConfigParser
func (RuntimeConfigParser) Parse ¶ added in v0.1.0
func (p RuntimeConfigParser) Parse(glob string) (RuntimeConfig, error)