platform

package
v0.0.0-...-34ebdd2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OSWindows OS = "windows"
	OSLinux      = "linux"
	OSMac        = "mac"
)
View Source
const (
	ArchArm64 Arch = "arm64"
	// While arm64 and aarch64 are the same architecture, some Linux distros
	// use arm64 (Debian and RHEL) and others use aarch64 (Amazon 2).
	ArchAarch64 Arch = "aarch64"
	ArchS390x        = "s390x"
	ArchPpc64le      = "ppc64le"
	ArchX86_64       = "x86_64"
)

Variables

This section is empty.

Functions

func CountForReleaseJSON

func CountForReleaseJSON() int

CountForReleaseJSON returns the number of platforms that we expect to put into the release JSON. This is all platforms _except_ those where the `SkipForJSONFeed` field is true.

Types

type Arch

type Arch string

func (Arch) ConstName

func (a Arch) ConstName() string

func (Arch) String

func (a Arch) String() string

type OS

type OS string

func (OS) ConstName

func (o OS) ConstName() string

func (OS) String

func (o OS) String() string

type Pkg

type Pkg string
const (
	PkgDeb Pkg = "deb"
	PkgRPM     = "rpm"
)

func (Pkg) ConstName

func (p Pkg) ConstName() string

func (Pkg) String

func (p Pkg) String() string

type Platform

type Platform struct {
	Name string
	// This is used to override the variant name. It should only be used for
	// special builds. In general, we want to use the OS name + arch for the
	// variant name.
	VariantName     string
	Arch            Arch
	OS              OS
	Pkg             Pkg
	Repos           []Repo
	BuildTags       []string
	BinaryExt       string
	SkipForJSONFeed bool
}

Platform represents a platform (a combination of OS, distro, version, and architecture) on which we may build/test the tools. There should be at least one evergreen buildvariant per platform, and there may be multiple.

func DetectLocal

func DetectLocal() (Platform, error)

DetectLocal detects the platform for non-evergreen use cases.

func GetByVariant

func GetByVariant(variant string) (Platform, bool)

func GetFromEnv

func GetFromEnv() (Platform, error)

GetFromEnv returns the Platform for this host, based on the value of EVG_VARIANT. It returns an error if EVG_VARIANT is unset or set to an unknown value.

func Platforms

func Platforms() []Platform

func (Platform) ArtifactExtensions

func (p Platform) ArtifactExtensions() []string

func (Platform) DebianArch

func (p Platform) DebianArch() string

func (Platform) RPMArch

func (p Platform) RPMArch() string

func (Platform) Variant

func (p Platform) Variant() string

type Repo

type Repo string
const (
	RepoOrg        Repo = "org"
	RepoEnterprise      = "enterprise"
)

func (Repo) ConstName

func (r Repo) ConstName() string

func (Repo) String

func (r Repo) String() string

Jump to

Keyboard shortcuts

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