dotnetexecute

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

Dotnet Execute Cloud Native Buildpack

The Dotnet Execute CNB sets the start command for a given .Net Core application once it has been built by preceding buildpacks.

Integration

The Dotnet Execute CNB completes the setup of a .Net Core application built using a sequence of CNBs. As such, it will be the only non-optional CNB in that sequence and is not explicitly required by any CNB that precedes it.

It provides dotnet-execute as a dependency, but currently there's no scenario we can imagine that you would use a downstream buildpack to require this dependency. If a user likes to include some other functionality, it can be done independent of the Dotnet Execute CNB without requiring a dependency of it.

To package this buildpack for consumption:

$ ./scripts/package.sh

This builds the buildpack's source using GOOS=linux by default. You can supply another value as the first argument to package.sh.

Specifying a project path

To specify a project subdirectory (i.e. the directory containing your .csproj/.fsproj/.vbproj file), please use the BP_DOTNET_PROJECT_PATH environment variable at build time either directly (e.g. pack build my-app --env BP_DOTNET_PROJECT_PATH=./src/my-app) or through a project.toml file. This configuration does not apply to FDD, FDE or Self-Contained app deployments.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(buildpackYMLParser BuildpackConfigParser, configParser ConfigParser, logger scribe.Logger) packit.BuildFunc

func Detect

func Detect(buildpackYMLParser BuildpackConfigParser, configParser ConfigParser, projectParser ProjectParser) packit.DetectFunc

Types

type BuildpackConfigParser added in v0.1.0

type BuildpackConfigParser interface {
	ParseProjectPath(path string) (projectPath string, err error)
}

type BuildpackYMLParser

type BuildpackYMLParser struct{}

func NewBuildpackYMLParser

func NewBuildpackYMLParser() BuildpackYMLParser

func (BuildpackYMLParser) Parse

func (p BuildpackYMLParser) Parse(path string) (Config, error)

func (BuildpackYMLParser) ParseProjectPath

func (p BuildpackYMLParser) ParseProjectPath(path string) (string, error)

type Config

type Config struct {
	ProjectPath string `yaml:"project-path"`
}

type ConfigParser added in v0.1.0

type ConfigParser interface {
	Parse(glob string) (RuntimeConfig, error)
}

type ProjectFileParser added in v0.1.0

type ProjectFileParser struct{}

func NewProjectFileParser added in v0.1.0

func NewProjectFileParser() ProjectFileParser

func (ProjectFileParser) ASPNetIsRequired added in v0.1.0

func (p ProjectFileParser) ASPNetIsRequired(path string) (bool, error)

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)

func (ProjectFileParser) ParseVersion added in v0.1.0

func (p ProjectFileParser) ParseVersion(path string) (string, error)

type ProjectParser added in v0.1.0

type ProjectParser interface {
	FindProjectFile(root string) (string, error)
	ParseVersion(path string) (string, error)
	ASPNetIsRequired(path string) (bool, error)
	NodeIsRequired(path string) (bool, error)
}

type RuntimeConfig added in v0.1.0

type RuntimeConfig struct {
	Path       string
	Version    string
	AppName    string
	Executable bool
	UsesASPNet bool
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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