build

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command *cli.Command = &cli.Command{
	Name:    "build",
	Aliases: []string{"b"},
	Usage:   "Build the project",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:    "project-file",
			Aliases: []string{"f"},
			Usage:   "The project file to use",
		},
		&cli.StringFlag{
			Name:    "build-context",
			Aliases: []string{"c"},
			Usage:   "The build context to use",
		},
		&cli.StringFlag{
			Name:    "system-name",
			Aliases: []string{"s"},
			Usage:   "The system name to use",
		},
		&cli.StringFlag{
			Name:    "registry",
			Aliases: []string{"r"},
			Usage:   "The registry to use",
			Value:   "acr",
		},
		&cli.StringFlag{
			Name:  "go-main-package-directory",
			Usage: "The main package directory to use when building a Go application",
		},
		&cli.StringFlag{
			Name:  "cache-tag",
			Usage: "The cache tag to use",
			Value: "latest-cache",
		},
		&cli.StringFlag{
			Name:    "severity",
			Aliases: []string{"S"},
			Usage:   "The severity to use when scanning the image: can be any combination of CRITICAL, HIGH, MEDIUM, LOW, or UNKNOWN separated by commas",
			Value:   "CRITICAL,HIGH",
		},
		&cli.StringSliceFlag{
			Name:    "include-files",
			Aliases: []string{"i"},
			Usage:   "The files to include in the build context",
		},
		&cli.StringSliceFlag{
			Name:    "include-directories",
			Aliases: []string{"I"},
			Usage:   "The directories to include in the build context",
		},
		&cli.BoolFlag{
			Name:    "push",
			Aliases: []string{"p"},
			Usage:   "Push the image to the registry",
			Value:   false,
		},
	},
	Action: Build,
}

Functions

func Build

func Build(c *cli.Context) error

Types

type BuildAndPushImageOptions

type BuildAndPushImageOptions struct {
	DockerfilePath  string
	BuildContext    string
	CacheTag        string
	ApplicationName string
	SystemName      string
	Registry        string
	Severity        string
	AdditionalTags  []string
	Push            bool
}

type CSharpProjectFile

type CSharpProjectFile struct {
	XMLName       xml.Name `xml:"Project"`
	SDK           string   `xml:"Sdk,attr"`
	PropertyGroup PropertyGroup
}

type DockerfileVariablesDotnet

type DockerfileVariablesDotnet struct {
	CsprojFile         string // required
	AssemblyName       string // required
	BaseImageTag       string // required
	RuntimeBaseImage   string // required
	IncludeFiles       []string
	IncludeDirectories []string
}

type GenerateDockerfileOptions

type GenerateDockerfileOptions struct {
	ProjectFile            string // required
	ApplicationName        string // required
	GoMainPackageDirectory string
	BuildContext           string
	IncludeFiles           []string
	IncludeDirectories     []string
}

type GoDockerfileVariables

type GoDockerfileVariables struct {
	ModuleDirectory      string // required
	BuildContext         string // required
	MainPackageDirectory string // required
	IncludeFiles         []string
	IncludeDirectories   []string
}

type PropertyGroup

type PropertyGroup struct {
	AssemblyName    string
	TargetFramework string
}

type ScanImageOptions added in v0.3.0

type ScanImageOptions struct {
	ImageName string // required
	Severity  string // required
}

Jump to

Keyboard shortcuts

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