Documentation
¶
Index ¶
- Constants
- func ReadKilnfileAndKilnfileLock(path string) (Kilnfile, KilnfileLock, error)
- func ReleaseSourceID(releaseConfig ReleaseSourceConfig) string
- func ResolveKilnfilePath(path string) (string, error)
- func Validate(spec Kilnfile, lock KilnfileLock) []error
- func WriteKilnfile(path string, kf Kilnfile) error
- type Bump
- type BumpList
- type ComponentLock
- func (lock ComponentLock) ParseVersion() (*semver.Version, error)
- func (lock ComponentLock) ReleaseSlug() boshdir.ReleaseSlug
- func (lock ComponentLock) StemcellSlug() boshdir.OSVersionSlug
- func (lock ComponentLock) String() string
- func (lock ComponentLock) WithRemote(source, path string) ComponentLock
- func (lock ComponentLock) WithSHA1(sum string) ComponentLock
- type ComponentSpec
- type Kilnfile
- type KilnfileLock
- type ReleaseSourceConfig
- type RepositoryReleaseLister
- type Stemcell
Constants ¶
View Source
const ( // ReleaseSourceTypeBOSHIO is the value of the Type field on cargo.ReleaseSourceConfig // for fetching https://bosh.io releases. ReleaseSourceTypeBOSHIO = "bosh.io" // ReleaseSourceTypeS3 is the value for the Type field on cargo.ReleaseSourceConfig // for releases stored on ReleaseSourceTypeS3 = "s3" // ReleaseSourceTypeGithub is the value for the Type field on cargo.ReleaseSourceConfig // for releases stored on GitHub. ReleaseSourceTypeGithub = "github" // ReleaseSourceTypeArtifactory is the value for the Type field on cargo.ReleaseSourceConfig // for releases stored on Artifactory. ReleaseSourceTypeArtifactory = "artifactory" )
Variables ¶
This section is empty.
Functions ¶
func ReadKilnfileAndKilnfileLock ¶ added in v0.84.0
func ReadKilnfileAndKilnfileLock(path string) (Kilnfile, KilnfileLock, error)
func ReleaseSourceID ¶ added in v0.77.0
func ReleaseSourceID(releaseConfig ReleaseSourceConfig) string
func ResolveKilnfilePath ¶ added in v0.84.0
func Validate ¶ added in v0.77.1
func Validate(spec Kilnfile, lock KilnfileLock) []error
func WriteKilnfile ¶ added in v0.79.0
WriteKilnfile does not validate the Kilnfile nor does it validate the path. Use ResolveKilnfilePath and maybe Validate before calling this.
Types ¶
type Bump ¶ added in v0.77.1
type Bump struct {
Name, FromVersion, ToVersion string
Releases []*github.RepositoryRelease
}
func CalculateBumps ¶ added in v0.77.1
func CalculateBumps(current, previous []ComponentLock) []Bump
func (Bump) ReleaseNotes ¶ added in v0.77.1
type BumpList ¶ added in v0.77.1
type BumpList []Bump
func ReleaseNotes ¶ added in v0.77.1
func (BumpList) ForLock ¶ added in v0.77.1
func (list BumpList) ForLock(lock ComponentLock) Bump
type ComponentLock ¶
type ComponentLock struct { Name string `yaml:"name"` SHA1 string `yaml:"sha1"` Version string `yaml:"version,omitempty"` StemcellOS string `yaml:"-"` StemcellVersion string `yaml:"-"` RemoteSource string `yaml:"remote_source"` RemotePath string `yaml:"remote_path"` }
ComponentLock represents an exact build of a bosh release It may identify the where the release is cached; it may identify the stemcell used to compile the release.
All fields must be comparable because this struct may be used as a key type in a map. Don't add array or map fields.
func (ComponentLock) ParseVersion ¶
func (lock ComponentLock) ParseVersion() (*semver.Version, error)
func (ComponentLock) ReleaseSlug ¶
func (lock ComponentLock) ReleaseSlug() boshdir.ReleaseSlug
func (ComponentLock) StemcellSlug ¶
func (lock ComponentLock) StemcellSlug() boshdir.OSVersionSlug
func (ComponentLock) String ¶
func (lock ComponentLock) String() string
func (ComponentLock) WithRemote ¶
func (lock ComponentLock) WithRemote(source, path string) ComponentLock
func (ComponentLock) WithSHA1 ¶
func (lock ComponentLock) WithSHA1(sum string) ComponentLock
type ComponentSpec ¶
type ComponentSpec struct { // Name is a required field and must be set with the bosh release name Name string `yaml:"name"` // Version if not set, it will default to ">0". // See https://github.com/Masterminds/semver for syntax Version string `yaml:"version,omitempty"` // StemcellOS may be set when a specifying a component // compiled with a particular stemcell. Usually you should // also set StemcellVersion when setting this field. StemcellOS string `yaml:"os,omitempty"` // StemcellVersion may be set when a specifying a component // compiled with a particular stemcell. Usually you should // also set StemcellOS when setting this field. StemcellVersion string `yaml:"stemcell_version,omitempty"` // GitHubRepository are where the BOSH release source code is GitHubRepository string `yaml:"github_repository,omitempty"` }
func (ComponentSpec) Lock ¶
func (spec ComponentSpec) Lock() ComponentLock
func (ComponentSpec) OSVersionSlug ¶
func (spec ComponentSpec) OSVersionSlug() boshdir.OSVersionSlug
func (ComponentSpec) ReleaseSlug ¶
func (spec ComponentSpec) ReleaseSlug() boshdir.ReleaseSlug
func (ComponentSpec) VersionConstraints ¶
func (spec ComponentSpec) VersionConstraints() (*semver.Constraints, error)
type Kilnfile ¶
type Kilnfile struct { ReleaseSources []ReleaseSourceConfig `yaml:"release_sources,omitempty"` Slug string `yaml:"slug,omitempty"` PreGaUserGroups []string `yaml:"pre_ga_user_groups,omitempty"` Releases []ComponentSpec `yaml:"releases,omitempty"` TileNames []string `yaml:"tile_names,omitempty"` Stemcell Stemcell `yaml:"stemcell_criteria,omitempty"` }
func ReadKilnfile ¶ added in v0.84.0
func (Kilnfile) ComponentSpec ¶
func (kf Kilnfile) ComponentSpec(name string) (ComponentSpec, error)
type KilnfileLock ¶
type KilnfileLock struct { Releases []ComponentLock `yaml:"releases"` Stemcell Stemcell `yaml:"stemcell_criteria"` }
func ReadKilnfileLock ¶ added in v0.84.0
func ReadKilnfileLock(path string) (KilnfileLock, error)
func (KilnfileLock) FindReleaseWithName ¶
func (k KilnfileLock) FindReleaseWithName(name string) (ComponentLock, error)
func (KilnfileLock) UpdateReleaseLockWithName ¶
func (k KilnfileLock) UpdateReleaseLockWithName(name string, lock ComponentLock) error
type ReleaseSourceConfig ¶
type ReleaseSourceConfig struct { Type string `yaml:"type,omitempty"` ID string `yaml:"id,omitempty"` Publishable bool `yaml:"publishable,omitempty"` Bucket string `yaml:"bucket,omitempty"` Region string `yaml:"region,omitempty"` AccessKeyId string `yaml:"access_key_id,omitempty"` SecretAccessKey string `yaml:"secret_access_key,omitempty"` PathTemplate string `yaml:"path_template,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` Org string `yaml:"org,omitempty"` GithubToken string `yaml:"github_token,omitempty"` Repo string `yaml:"repo,omitempty"` ArtifactoryHost string `yaml:"artifactory_host,omitempty"` Username string `yaml:"username,omitempty"` Password string `yaml:"password,omitempty"` }
type RepositoryReleaseLister ¶ added in v0.77.1
type RepositoryReleaseLister = repositoryReleaseLister
Click to show internal directories.
Click to hide internal directories.