manifest

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 26 Imported by: 9

Documentation

Overview

Package manifest is used to define an osbuild manifest as a series of pipelines with content. Typically, a Manifest is created using manifest.New() and pipelines are defined and added to it using the pipeline constructors (e.g., NewBuild()) with the manifest as the first argument. The pipelines are added in the order they are called.

The package implements a standard set of osbuild pipelines. A pipeline conceptually represents a named filesystem tree, optionally generated in a provided build root (represented by another pipeline). All inputs to a pipeline must be explicitly specified, either in terms of another pipeline, in terms of content addressable inputs or in terms of static parameters to the inherited Pipeline structs.

Index

Constants

View Source
const (
	DISTRO_NULL = iota
	DISTRO_EL9
	DISTRO_EL8
	DISTRO_EL7
	DISTRO_FEDORA
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnacondaInstaller

type AnacondaInstaller struct {
	Base

	// The type of the Anaconda installer tree to prepare, this can be either
	// a 'live' or a 'payload' and it controls which stages are added to the
	// manifest.
	Type AnacondaInstallerType

	// Packages to install and/or exclude in addition to the ones required by the
	// pipeline.
	ExtraPackages   []string
	ExcludePackages []string

	// Extra repositories to install packages from
	ExtraRepos []rpmmd.RepoConfig

	// Users and Groups to create during installation.
	// If empty, then the user can interactively create users at install time.
	Users  []users.User
	Groups []users.Group

	// Biosdevname indicates whether or not biosdevname should be used to
	// name network devices when booting the installer. This may affect
	// the naming of network devices on the target system.
	Biosdevname bool

	// Variant is the variant of the product being installed, if applicable.
	Variant string

	// Interactive defaults is a kickstart stage that can be provided, it
	// will be written to /usr/share/anaconda/interactive-defaults
	InteractiveDefaults *AnacondaInteractiveDefaults

	// Additional anaconda modules to enable
	AdditionalAnacondaModules []string

	// Additional dracut modules and drivers to enable
	AdditionalDracutModules []string
	AdditionalDrivers       []string

	Files []*fsnode.File
	// contains filtered or unexported fields
}

An Anaconda represents the installer tree as found on an ISO this can be either a payload installer or a live installer depending on `Type`.

func NewAnacondaInstaller

func NewAnacondaInstaller(m *Manifest,
	installerType AnacondaInstallerType,
	buildPipeline *Build,
	platform platform.Platform,
	repos []rpmmd.RepoConfig,
	kernelName,
	product,
	version string) *AnacondaInstaller

func (*AnacondaInstaller) Platform

func (p *AnacondaInstaller) Platform() platform.Platform

type AnacondaInstallerISOTree

type AnacondaInstallerISOTree struct {
	Base

	// TODO: review optional and mandatory fields and their meaning
	OSName  string
	Release string
	Users   []users.User
	Groups  []users.Group

	PartitionTable *disk.PartitionTable

	// The location of the kickstart file, if it will be added to the
	// bootiso-tree.
	// Otherwise, it should be defined in the interactive defaults of the
	// Anaconda pipeline.
	KSPath string

	// The path where the payload (tarball or ostree repo) will be stored.
	PayloadPath string

	SquashfsCompression string

	OSPipeline         *OS
	OSTreeCommitSource *ostree.SourceSpec

	KernelOpts []string

	// Enable ISOLinux stage
	ISOLinux bool
	// contains filtered or unexported fields
}

An AnacondaInstallerISOTree represents a tree containing the anaconda installer, configuration in terms of a kickstart file, as well as an embedded payload to be installed, this payload can either be an ostree CommitSpec or OSPipeline for an OS.

func NewAnacondaInstallerISOTree

func NewAnacondaInstallerISOTree(buildPipeline *Build, anacondaPipeline *AnacondaInstaller, rootfsPipeline *ISORootfsImg, bootTreePipeline *EFIBootTree) *AnacondaInstallerISOTree

type AnacondaInstallerType

type AnacondaInstallerType int
const (
	AnacondaInstallerTypeLive AnacondaInstallerType = iota + 1
	AnacondaInstallerTypePayload
)

type AnacondaInteractiveDefaults

type AnacondaInteractiveDefaults struct {
	TarPath string
}

func NewAnacondaInteractiveDefaults

func NewAnacondaInteractiveDefaults(tarPath string) *AnacondaInteractiveDefaults

type Arch

type Arch uint64
const (
	ARCH_X86_64 Arch = iota
	ARCH_AARCH64
	ARCH_S390X
	ARCH_PPC64LE
)

type Base

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

A Base represents the core functionality shared between each of the pipeline implementations, and the Base struct must be embedded in each of them.

func NewBase

func NewBase(m *Manifest, name string, build *Build) Base

NewBase returns a generic Pipeline object. The name is mandatory, immutable and must be unique among all the pipelines used in a manifest, which is currently not enforced. The build argument is a pipeline representing a build root in which the rest of the pipeline is built. In order to ensure reproducibility a build pipeline must always be provided, except for int he build pipeline itself. When a build pipeline is not provided the build host's filesystem is used as the build root. The runner specifies how to use this pipeline as a build pipeline, by naming the distro it contains. When the host system is used as a build root, then the necessary runner is autodetected.

func (Base) BuildPipeline

func (p Base) BuildPipeline() *Build

func (*Base) Checkpoint

func (p *Base) Checkpoint()

func (*Base) Export

func (p *Base) Export() *artifact.Artifact

func (Base) Manifest

func (p Base) Manifest() *Manifest

func (Base) Name

func (p Base) Name() string

Name returns the name of the pipeline. The name must be unique for a given manifest. Pipeline names are used to refer to pipelines either as dependencies between pipelines or for exporting them.

type Build

type Build struct {
	Base
	// contains filtered or unexported fields
}

A Build represents the build environment for other pipelines. As a general rule, tools required to build pipelines are used from the build environment, rather than from the pipeline itself. Without a specified build environment, the build host's root filesystem would be used, which is not predictable nor reproducible. For the purposes of building the build pipeline, we do use the build host's filesystem, this means we should make minimal assumptions about what's available there.

func NewBuild

func NewBuild(m *Manifest, runner runner.Runner, repos []rpmmd.RepoConfig) *Build

NewBuild creates a new build pipeline from the repositories in repos and the specified packages.

type ContentTest

type ContentTest struct {
	Base
	// contains filtered or unexported fields
}

A ContentTest can be used to define content sources without generating pipelines. It is useful for testing but not much else.

func NewContentTest

func NewContentTest(m *Manifest, name string, packageSets []rpmmd.PackageSet, containers []container.SourceSpec, commits []ostree.SourceSpec) *ContentTest

NewContentTest creates a new ContentTest pipeline with a given name and content sources.

type CoreOSISOTree

type CoreOSISOTree struct {
	Base

	// TODO: review optional and mandatory fields and their meaning
	OSName  string
	Release string
	Users   []users.User
	Groups  []users.Group

	PartitionTable *disk.PartitionTable

	// The path where the payload (tarball or ostree repo) will be stored.
	PayloadPath string

	// Enable ISOLinux stage
	ISOLinux bool

	KernelOpts []string
	// contains filtered or unexported fields
}

func NewCoreOSISOTree

func NewCoreOSISOTree(
	buildPipeline *Build,
	payloadPipeline *XZ,
	coiPipeline *CoreOSInstaller,
	bootTreePipeline *EFIBootTree) *CoreOSISOTree

type CoreOSInstaller

type CoreOSInstaller struct {
	Base

	// Packages to install or exclude in addition to the ones required by the
	// pipeline.
	ExtraPackages   []string
	ExcludePackages []string

	// Extra repositories to install packages from
	ExtraRepos []rpmmd.RepoConfig

	Variant string

	// Biosdevname indicates whether or not biosdevname should be used to
	// name network devices when booting the installer. This may affect
	// the naming of network devices on the target system.
	Biosdevname bool

	FDO *fdo.Options

	// For the coreos-installer we only have EmbeddedOptions for ignition
	Ignition *ignition.EmbeddedOptions

	AdditionalDracutModules []string
	// contains filtered or unexported fields
}

func NewCoreOSInstaller

func NewCoreOSInstaller(m *Manifest,
	buildPipeline *Build,
	platform platform.Platform,
	repos []rpmmd.RepoConfig,
	kernelName,
	product,
	version string) *CoreOSInstaller

NewCoreOSInstaller creates an CoreOS installer pipeline object.

func (*CoreOSInstaller) Platform

func (p *CoreOSInstaller) Platform() platform.Platform

type Distro

type Distro uint64

type EFIBootTree

type EFIBootTree struct {
	Base

	Platform platform.Platform

	UEFIVendor string
	ISOLabel   string

	KernelOpts []string
	// contains filtered or unexported fields
}

func NewEFIBootTree

func NewEFIBootTree(m *Manifest, buildPipeline *Build, product, version string) *EFIBootTree

type FilePipeline

type FilePipeline interface {
	Pipeline
	Filename() string
	SetFilename(fname string)
}

FilePipeline is any pipeline that produces a single file (typically an image file).

type ISO

type ISO struct {
	Base
	ISOLinux bool
	// contains filtered or unexported fields
}

An ISO represents a bootable ISO file created from an an existing ISOTreePipeline.

func NewISO

func NewISO(buildPipeline *Build, treePipeline Pipeline, isoLabel string) *ISO

func (*ISO) Export

func (p *ISO) Export() *artifact.Artifact

func (ISO) Filename

func (p ISO) Filename() string

func (*ISO) SetFilename

func (p *ISO) SetFilename(filename string)

type ISORootfsImg

type ISORootfsImg struct {
	Base

	Size uint64
	// contains filtered or unexported fields
}

func NewISORootfsImg

func NewISORootfsImg(buildPipeline *Build, installerPipeline Pipeline) *ISORootfsImg

type Manifest

type Manifest struct {

	// Distro defines the distribution of the image that this manifest will
	// generate. It is used for determining package names that differ between
	// different distributions and version.
	Distro Distro
	// contains filtered or unexported fields
}

Manifest represents a manifest initialised with all the information required to generate the pipelines but no content. The content type sources (PackageSetChains, ContainerSourceSpecs, OSTreeSourceSpecs) must be retrieved through their corresponding Getters and resolved before serializing.

func New

func New() Manifest

func (Manifest) GetCheckpoints

func (m Manifest) GetCheckpoints() []string

func (Manifest) GetContainerSourceSpecs

func (m Manifest) GetContainerSourceSpecs() map[string][]container.SourceSpec

func (Manifest) GetExports

func (m Manifest) GetExports() []string

func (Manifest) GetOSTreeSourceSpecs

func (m Manifest) GetOSTreeSourceSpecs() map[string][]ostree.SourceSpec

func (Manifest) GetPackageSetChains

func (m Manifest) GetPackageSetChains() map[string][]rpmmd.PackageSet

func (Manifest) Serialize

func (m Manifest) Serialize(packageSets map[string][]rpmmd.PackageSpec, containerSpecs map[string][]container.Spec, ostreeCommits map[string][]ostree.CommitSpec) (OSBuildManifest, error)

type OCIContainer

type OCIContainer struct {
	Base

	Cmd          []string
	ExposedPorts []string
	// contains filtered or unexported fields
}

An OCIContainer represents an OCI container, containing a filesystem tree created by another Pipeline.

func NewOCIContainer

func NewOCIContainer(buildPipeline *Build, treePipeline TreePipeline) *OCIContainer

func (*OCIContainer) Export

func (p *OCIContainer) Export() *artifact.Artifact

func (OCIContainer) Filename

func (p OCIContainer) Filename() string

func (*OCIContainer) SetFilename

func (p *OCIContainer) SetFilename(filename string)

type OS

type OS struct {
	Base
	// Customizations to apply to the base OS
	OSCustomizations
	// Environment the system will run in
	Environment environment.Environment
	// Workload to install on top of the base system
	Workload workload.Workload
	// Ref of ostree commit (optional). If empty the tree cannot be in an ostree commit
	OSTreeRef string
	// OSTreeParent source spec (optional). If nil the new commit (if
	// applicable) will have no parent
	OSTreeParent *ostree.SourceSpec
	// Partition table, if nil the tree cannot be put on a partitioned disk
	PartitionTable *disk.PartitionTable

	// NoBLS configures the image bootloader with traditional menu entries
	// instead of BLS. Required for legacy systems like RHEL 7.
	NoBLS     bool
	OSProduct string
	OSVersion string
	OSNick    string

	// InstallWeakDeps enables installation of weak dependencies for packages
	// that are statically defined for the pipeline.
	// Defaults to True.
	InstallWeakDeps bool
	// contains filtered or unexported fields
}

OS represents the filesystem tree of the target image. This roughly corresponds to the root filesystem once an instance of the image is running.

func NewOS

func NewOS(m *Manifest,
	buildPipeline *Build,
	platform platform.Platform,
	repos []rpmmd.RepoConfig) *OS

NewOS creates a new OS pipeline. build is the build pipeline to use for building the OS pipeline. platform is the target platform for the final image. repos are the repositories to install RPMs from.

func (*OS) Platform

func (p *OS) Platform() platform.Platform

type OSBuildManifest

type OSBuildManifest []byte

An OSBuildManifest is an opaque JSON object, which is a valid input to osbuild

func (OSBuildManifest) MarshalJSON

func (m OSBuildManifest) MarshalJSON() ([]byte, error)

func (*OSBuildManifest) UnmarshalJSON

func (m *OSBuildManifest) UnmarshalJSON(payload []byte) error

type OSCustomizations

type OSCustomizations struct {

	// Packages to install in addition to the ones required by the
	// pipeline.
	ExtraBasePackages []string

	// Packages to exclude from the base package set. This is useful in
	// case of weak dependencies, comps groups, or where multiple packages
	// can satisfy a dependency. Must not conflict with the included base
	// package set.
	ExcludeBasePackages []string

	// Additional repos to install the base packages from.
	ExtraBaseRepos []rpmmd.RepoConfig

	// Containers to embed in the image (source specification)
	// TODO: move to workload
	Containers []container.SourceSpec

	// KernelName indicates that a kernel is installed, and names the kernel
	// package.
	KernelName string

	// KernelOptionsAppend are appended to the kernel commandline
	KernelOptionsAppend []string

	// KernelOptionsBootloader controls whether kernel command line options
	// should be specified in the bootloader grubenv configuration. Otherwise
	// they are specified in /etc/kernel/cmdline (default).
	//
	// NB: The kernel options need to be still specified in /etc/default/grub
	// under the GRUB_CMDLINE_LINUX variable. The reason is that it is used by
	// the 10_linux script executed by grub2-mkconfig to override the kernel
	// options in /etc/kernel/cmdline if the file has older timestamp than
	// /etc/default/grub.
	//
	// This should only be used for RHEL 8 and CentOS 8 images that use grub
	// (non s390x).  Newer releases (9+) should keep this disabled.
	KernelOptionsBootloader bool

	GPGKeyFiles      []string
	Language         string
	Keyboard         *string
	X11KeymapLayouts []string
	Hostname         string
	Timezone         string
	EnabledServices  []string
	DisabledServices []string
	DefaultTarget    string

	// SELinux policy, when set it enables the labeling of the tree with the
	// selected profile
	SElinux string

	SELinuxForceRelabel *bool

	// Do not install documentation
	ExcludeDocs bool

	Groups []users.Group
	Users  []users.User

	ShellInit []shell.InitFile

	// TODO: drop osbuild types from the API
	Firewall             *osbuild.FirewallStageOptions
	Grub2Config          *osbuild.GRUB2Config
	Sysconfig            []*osbuild.SysconfigStageOptions
	SystemdLogind        []*osbuild.SystemdLogindStageOptions
	CloudInit            []*osbuild.CloudInitStageOptions
	Modprobe             []*osbuild.ModprobeStageOptions
	DracutConf           []*osbuild.DracutConfStageOptions
	SystemdUnit          []*osbuild.SystemdUnitStageOptions
	Authselect           *osbuild.AuthselectStageOptions
	SELinuxConfig        *osbuild.SELinuxConfigStageOptions
	Tuned                *osbuild.TunedStageOptions
	Tmpfilesd            []*osbuild.TmpfilesdStageOptions
	PamLimitsConf        []*osbuild.PamLimitsConfStageOptions
	Sysctld              []*osbuild.SysctldStageOptions
	DNFConfig            []*osbuild.DNFConfigStageOptions
	DNFAutomaticConfig   *osbuild.DNFAutomaticConfigStageOptions
	YUMConfig            *osbuild.YumConfigStageOptions
	YUMRepos             []*osbuild.YumReposStageOptions
	SshdConfig           *osbuild.SshdConfigStageOptions
	GCPGuestAgentConfig  *osbuild.GcpGuestAgentConfigOptions
	AuthConfig           *osbuild.AuthconfigStageOptions
	PwQuality            *osbuild.PwqualityConfStageOptions
	OpenSCAPTailorConfig *osbuild.OscapAutotailorStageOptions
	OpenSCAPConfig       *osbuild.OscapRemediationStageOptions
	NTPServers           []osbuild.ChronyConfigServer
	WAAgentConfig        *osbuild.WAAgentConfStageOptions
	UdevRules            *osbuild.UdevRulesStageOptions
	WSLConfig            *osbuild.WSLConfStageOptions
	LeapSecTZ            *string
	FactAPIType          *facts.APIType
	Presets              []osbuild.Preset

	Subscription *subscription.ImageOptions
	RHSMConfig   map[subscription.RHSMStatus]*osbuild.RHSMStageOptions

	// Custom directories and files to create in the image
	Directories []*fsnode.Directory
	Files       []*fsnode.File
}

OSCustomizations encapsulates all configuration applied to the base operating system independently of where and how it is integrated and what workload it is running. TODO: move out kernel/bootloader/cloud-init/... to other

abstractions, this should ideally only contain things that
can always be applied.

type OSTreeCommit

type OSTreeCommit struct {
	Base
	OSVersion string
	// contains filtered or unexported fields
}

OSTreeCommit represents an ostree with one commit.

func NewOSTreeCommit

func NewOSTreeCommit(buildPipeline *Build, treePipeline *OS, ref string) *OSTreeCommit

NewOSTreeCommit creates a new OSTree commit pipeline. The treePipeline is the tree representing the content of the commit. ref is the ref to create the commit under.

type OSTreeCommitServer

type OSTreeCommitServer struct {
	Base
	// Packages to install in addition to the ones required by the
	// pipeline.
	ExtraPackages []string
	// Extra repositories to install packages from
	ExtraRepos []rpmmd.RepoConfig
	// TODO: should this be configurable?
	Language string
	// contains filtered or unexported fields
}

An OSTreeCommitServer contains an nginx server serving an embedded ostree commit.

func NewOSTreeCommitServer

func NewOSTreeCommitServer(m *Manifest,
	buildPipeline *Build,
	platform platform.Platform,
	repos []rpmmd.RepoConfig,
	commitPipeline *OSTreeCommit,
	nginxConfigPath,
	listenPort string) *OSTreeCommitServer

NewOSTreeCommitServer creates a new pipeline. The content is built from repos and packages, which must contain nginx. commitPipeline is a pipeline producing an ostree commit to be served. nginxConfigPath is the path to the main nginx config file and listenPort is the port nginx will be listening on.

func (*OSTreeCommitServer) Platform

func (p *OSTreeCommitServer) Platform() platform.Platform

type OSTreeDeployment

type OSTreeDeployment struct {
	Base

	Remote ostree.Remote

	OSVersion string

	SysrootReadOnly bool

	KernelOptionsAppend []string
	Keyboard            string
	Locale              string

	Users  []users.User
	Groups []users.Group

	PartitionTable *disk.PartitionTable

	// Specifies the ignition platform to use.
	// If empty, ignition is not enabled.
	IgnitionPlatform string

	Directories []*fsnode.Directory
	Files       []*fsnode.File

	EnabledServices  []string
	DisabledServices []string

	FIPS bool

	// Lock the root account in the deployment unless the user defined root
	// user options in the build configuration.
	LockRoot bool
	// contains filtered or unexported fields
}

OSTreeDeployment represents the filesystem tree of a target image based on a deployed ostree commit.

func NewOSTreeCommitDeployment added in v0.20.0

func NewOSTreeCommitDeployment(buildPipeline *Build,
	m *Manifest,
	commit *ostree.SourceSpec,
	osName string,
	platform platform.Platform) *OSTreeDeployment

NewOSTreeCommitDeployment creates a pipeline for an ostree deployment from a commit.

func NewOSTreeContainerDeployment added in v0.20.0

func NewOSTreeContainerDeployment(buildPipeline *Build,
	m *Manifest,
	container *container.SourceSpec,
	ref string,
	osName string,
	platform platform.Platform) *OSTreeDeployment

NewOSTreeDeployment creates a pipeline for an ostree deployment from a container

type OSTreeEncapsulate added in v0.20.0

type OSTreeEncapsulate struct {
	Base
	// contains filtered or unexported fields
}

func NewOSTreeEncapsulate added in v0.20.0

func NewOSTreeEncapsulate(buildPipeline *Build, inputPipeline Pipeline, pipelinename string) *OSTreeEncapsulate

func (*OSTreeEncapsulate) Export added in v0.20.0

func (p *OSTreeEncapsulate) Export() *artifact.Artifact

func (OSTreeEncapsulate) Filename added in v0.20.0

func (p OSTreeEncapsulate) Filename() string

func (*OSTreeEncapsulate) SetFilename added in v0.20.0

func (p *OSTreeEncapsulate) SetFilename(filename string)

type OVF

type OVF struct {
	Base
	// contains filtered or unexported fields
}

A OVF copies a vmdk image to it's own tree and generates an OVF descriptor

func NewOVF

func NewOVF(buidPipeline *Build, imgPipeline *VMDK) *OVF

NewOVF creates a new OVF pipeline. imgPipeline is the pipeline producing the vmdk image.

type PackageSelector

type PackageSelector func([]rpmmd.PackageSet) []rpmmd.PackageSet

type Pipeline

type Pipeline interface {

	// Name of the pipeline.
	Name() string

	// Checkpoint this pipeline when osbuild is called.
	Checkpoint()

	// Export this tree of this pipeline as an artifact when osbuild is called.
	Export() *artifact.Artifact

	// BuildPipeline returns a reference to the pipeline that creates the build
	// root for this pipeline. For build pipelines, it should return nil.
	BuildPipeline() *Build

	// Manifest returns a reference to the Manifest which this Pipeline belongs to.
	Manifest() *Manifest
	// contains filtered or unexported methods
}

Pipeline serializes to a series of stages that modify a file system tree when used as input to osbuild. Different Pipelines serialize to different sequences of stages depending on their type and configuration.

type QCOW2

type QCOW2 struct {
	Base

	Compat string
	// contains filtered or unexported fields
}

A QCOW2 turns a raw image file into qcow2 image.

func NewQCOW2

func NewQCOW2(buildPipeline *Build, imgPipeline FilePipeline) *QCOW2

NewQCOW2 createsa new QCOW2 pipeline. imgPipeline is the pipeline producing the raw image. The pipeline name is the name of the new pipeline. Filename is the name of the produced qcow2 image.

func (*QCOW2) Export

func (p *QCOW2) Export() *artifact.Artifact

func (QCOW2) Filename

func (p QCOW2) Filename() string

func (*QCOW2) SetFilename

func (p *QCOW2) SetFilename(filename string)

type RawImage

type RawImage struct {
	Base

	PartTool osbuild.PartTool
	// contains filtered or unexported fields
}

A RawImage represents a raw image file which can be booted in a hypervisor. It is created from an existing OSPipeline.

func NewRawImage

func NewRawImage(buildPipeline *Build, treePipeline *OS) *RawImage

func (*RawImage) Export

func (p *RawImage) Export() *artifact.Artifact

func (RawImage) Filename

func (p RawImage) Filename() string

func (*RawImage) SetFilename

func (p *RawImage) SetFilename(filename string)

type RawOSTreeImage

type RawOSTreeImage struct {
	Base
	// contains filtered or unexported fields
}

A RawOSTreeImage represents a raw ostree image file which can be booted in a hypervisor. It is created from an existing OSTreeDeployment.

func NewRawOStreeImage

func NewRawOStreeImage(buildPipeline *Build, treePipeline *OSTreeDeployment, platform platform.Platform) *RawOSTreeImage

func (*RawOSTreeImage) Export

func (p *RawOSTreeImage) Export() *artifact.Artifact

func (RawOSTreeImage) Filename

func (p RawOSTreeImage) Filename() string

func (*RawOSTreeImage) SetFilename

func (p *RawOSTreeImage) SetFilename(filename string)

type Tar

type Tar struct {
	Base

	Format   osbuild.TarArchiveFormat
	RootNode osbuild.TarRootNode
	ACLs     *bool
	SELinux  *bool
	Xattrs   *bool
	// contains filtered or unexported fields
}

A Tar represents the contents of another pipeline in a tar file

func NewTar

func NewTar(buildPipeline *Build, inputPipeline Pipeline, pipelinename string) *Tar

NewTar creates a new TarPipeline. The inputPipeline represents the filesystem tree which will be the contents of the tar file. The pipelinename is the name of the pipeline. The filename is the name of the output tar file.

func (*Tar) Export

func (p *Tar) Export() *artifact.Artifact

func (Tar) Filename

func (p Tar) Filename() string

func (*Tar) SetFilename

func (p *Tar) SetFilename(filename string)

type TreePipeline

type TreePipeline interface {
	Name() string
	Manifest() *Manifest
	BuildPipeline() *Build
	Platform() platform.Platform
}

TreePipeline is any pipeline that produces a directory tree.

type VMDK

type VMDK struct {
	Base
	// contains filtered or unexported fields
}

A VMDK turns a raw image file or a raw ostree image file into vmdk image.

func NewVMDK

func NewVMDK(buildPipeline *Build, imgPipeline FilePipeline) *VMDK

NewVMDK creates a new VMDK pipeline. imgPipeline is the pipeline producing the raw image. imgOstreePipeline is the pipeline producing the raw ostree image. Either imgPipeline or imgOStreePipeline are required, but not both at the same time. Filename is the name of the produced image.

func (*VMDK) Export

func (p *VMDK) Export() *artifact.Artifact

func (VMDK) Filename

func (p VMDK) Filename() string

func (*VMDK) SetFilename

func (p *VMDK) SetFilename(filename string)

type VPC

type VPC struct {
	Base

	ForceSize *bool
	// contains filtered or unexported fields
}

A VPC turns a raw image file into qemu-based image format, such as qcow2.

func NewVPC

func NewVPC(buildPipeline *Build, imgPipeline *RawImage) *VPC

NewVPC createsa new Qemu pipeline. imgPipeline is the pipeline producing the raw image. The pipeline name is the name of the new pipeline. Filename is the name of the produced image.

func (*VPC) Export

func (p *VPC) Export() *artifact.Artifact

func (VPC) Filename

func (p VPC) Filename() string

func (*VPC) SetFilename

func (p *VPC) SetFilename(filename string)

type XZ

type XZ struct {
	Base
	// contains filtered or unexported fields
}

The XZ pipeline compresses a raw image file using xz.

func NewXZ

func NewXZ(buildPipeline *Build, imgPipeline FilePipeline) *XZ

NewXZ creates a new XZ pipeline. imgPipeline is the pipeline producing the raw image that will be xz compressed.

func (*XZ) Export

func (p *XZ) Export() *artifact.Artifact

func (XZ) Filename

func (p XZ) Filename() string

func (*XZ) SetFilename

func (p *XZ) SetFilename(filename string)

Jump to

Keyboard shortcuts

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