process

package
v2.7.20 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, pullRegistry docker.Registry, pushRegistry docker.Registry, cfg *config.Config,
	downloader nexus.Downloader, prepper Prepper, layerBuilder Builder, sporingsLoggerClient sporingslogger.Sporingslogger) error

Build a container image

func CheckTagsForOverwrite added in v2.7.8

func CheckTagsForOverwrite(isSnapshot bool, tags []string, tagWith string, semanticVersion string, completeVersion string) error

CheckTagsForOverwrite / Check that we do not overwrite existing TAGS SNAPSHOT tags can be overwritten

Types

type Builder

type Builder interface {
	Build(buildConfig docker.BuildConfig, baseimageLayers *LayerProvider) (*LayerProvider, error)
	Pull(ctx context.Context, buildConfig docker.BuildConfig) (*LayerProvider, error)
	Push(ctx context.Context, buildResult *LayerProvider, tag []string) error
}

Builder interface

func NewLayerBuilder

func NewLayerBuilder(config *config.Config, pushregistry docker.Registry, pullregistry docker.Registry) Builder

NewLayerBuilder return Builder of type LayerBuilder

type Layer

type Layer struct {
	Digest  string
	Size    int
	Content func(cxt context.Context) (io.ReadCloser, error)
}

Layer represent an image blob

type LayerBuilder

type LayerBuilder struct {
	// contains filtered or unexported fields
}

LayerBuilder configuration

func (*LayerBuilder) Build

func (l *LayerBuilder) Build(buildConfig docker.BuildConfig, baseImageLayerProvider *LayerProvider) (*LayerProvider, error)

Build container image

func (*LayerBuilder) Pull

func (l *LayerBuilder) Pull(ctx context.Context, buildConfig docker.BuildConfig) (*LayerProvider, error)

Pull layers

func (*LayerBuilder) Push

func (l *LayerBuilder) Push(ctx context.Context, layers *LayerProvider, tag []string) error

Push layers and tags

type LayerProvider

type LayerProvider struct {
	Manifest        *docker.ManifestV2
	ContainerConfig *docker.ContainerConfig
	BaseImage       runtime.DockerImage
	Layers          []Layer
}

LayerProvider keep track of the image layers

type Prepper

type Prepper func(
	cfg *config.Config,
	auroraVersion *runtime.AuroraVersion,
	deliverable nexus.Deliverable,
	baseImage runtime.BaseImage) (*docker.BuildConfig, error)

Prepper is a fuction used to prepare a docker image. It is called within the context of the prepare stage

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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