manifest

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 14 Imported by: 11

README

Ziplinee CI

The ziplinee-ci-manifest library is part of the Ziplinee CI system documented at https://ziplinee.io.

Please file any issues related to Ziplinee CI at https://github.com/ziplineeci/ziplinee-ci-central/issues

Ziplinee-ci-manifest

This library contains the build manifest classes and helpers for the Ziplinee CI build system.

Development

To start development run

git clone git@github.com:ziplineeci/ziplinee-ci-manifest.git
cd ziplinee-ci-manifest

Before committing your changes run

go test
go mod tidy

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(manifestPath string) bool

Exists checks whether the .ziplinee.yaml exists

func OperatingSystemArrayContains

func OperatingSystemArrayContains(array []OperatingSystem, search OperatingSystem) bool

OperatingSystemArrayContains checks if an array contains a specific value

Types

type BuilderType

type BuilderType string
const (
	BuilderTypeUnknown    BuilderType = ""
	BuilderTypeDocker     BuilderType = "docker"
	BuilderTypeKubernetes BuilderType = "kubernetes"
)

type ExecProbe

type ExecProbe struct {
	Command []string `yaml:"command,omitempty"`
}

type HttpGetProbe

type HttpGetProbe struct {
	Path   string `yaml:"path,omitempty"`
	Port   int    `yaml:"port,omitempty"`
	Host   string `yaml:"host,omitempty"`
	Scheme string `yaml:"scheme,omitempty"`
}

type OperatingSystem

type OperatingSystem string
const (
	OperatingSystemUnknown OperatingSystem = ""
	OperatingSystemLinux   OperatingSystem = "linux"
	OperatingSystemWindows OperatingSystem = "windows"
)

type PubsubMessage

type PubsubMessage struct {
	Attributes  map[string]string `json:"attributes,omitempty"`
	Data        string            `json:"data,omitempty"`
	MessageID   string            `json:"messageId,omitempty"`
	PublishTime time.Time         `json:"publishTime,omitempty"`
	OrderingKey string            `json:"orderingKey,omitempty"`
}

PubsubMessage is a container for a pubsub push message

type ReadinessProbe

type ReadinessProbe struct {
	HttpGet        *HttpGetProbe `yaml:"httpGet,omitempty"`
	Exec           *ExecProbe    `yaml:"exec,omitempty"`
	TimeoutSeconds int           `yaml:"timeoutSeconds,omitempty"`

	// deprecated
	Path     string `yaml:"path,omitempty"`     // httpGet.path
	Port     int    `yaml:"port,omitempty"`     // httpGet.port
	Protocol string `yaml:"protocol,omitempty"` // httpGet.scheme
	Hostname string `yaml:"hostname,omitempty"` // httpGet.host
}

ReadinessProbe defines an http readiness probe

func (*ReadinessProbe) SetDefaults

func (readiness *ReadinessProbe) SetDefaults(serviceName string)

SetDefaults sets default values for properties of ZiplineeService if not defined

type StorageMedium

type StorageMedium string
const (
	StorageMediumDefault StorageMedium = ""       // use whatever the default is for the node, assume anything we don't explicitly handle is this
	StorageMediumMemory  StorageMedium = "memory" // use memory (e.g. tmpfs on linux)
)

type StringOrStringArray

type StringOrStringArray struct {
	Values []string
}

StringOrStringArray is used to unmarshal/marshal either a single string value or a string array

func (StringOrStringArray) Contains

func (s StringOrStringArray) Contains(value string) bool

Contains test whether the compared value matches one of the values

func (StringOrStringArray) MarshalJSON

func (s StringOrStringArray) MarshalJSON() ([]byte, error)

MarshalJSON customizes marshalling a StringOrStringArray

func (StringOrStringArray) MarshalYAML

func (s StringOrStringArray) MarshalYAML() (out interface{}, err error)

MarshalYAML customizes marshalling a StringOrStringArray

func (*StringOrStringArray) UnmarshalJSON

func (s *StringOrStringArray) UnmarshalJSON(b []byte) error

UnmarshalJSON customizes unmarshalling a StringOrStringArray

func (*StringOrStringArray) UnmarshalYAML

func (s *StringOrStringArray) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling a StringOrStringArray

type TriggerType

type TriggerType string
const (
	TriggerTypeUnknown TriggerType = ""
	TriggerTypeBuild   TriggerType = "build"
	TriggerTypeRelease TriggerType = "release"
	TriggerTypeBot     TriggerType = "bot"
)

type ZiplineeBitbucketEvent added in v0.0.2

type ZiplineeBitbucketEvent struct {
	Event         string `yaml:"event,omitempty" json:"event,omitempty"`
	Repository    string `yaml:"repository,omitempty" json:"repository,omitempty"`
	HookUUID      string `yaml:"hookUUID,omitempty" json:"hookUUID,omitempty"`
	RequestUUID   string `yaml:"requestUUID,omitempty" json:"requestUUID,omitempty"`
	AttemptNumber string `yaml:"attemptNumber,omitempty" json:"attemptNumber,omitempty"`
	Payload       string `yaml:"payload,omitempty" json:"payload,omitempty"`
}

ZiplineeBitbucketEvent fires for bitbucket events

type ZiplineeBitbucketTrigger added in v0.0.2

type ZiplineeBitbucketTrigger struct {
	Events     []string `yaml:"events,omitempty" json:"events,omitempty"`
	Repository string   `yaml:"repository,omitempty" json:"repository,omitempty"`
}

ZiplineeBitbucketTrigger fires for bitbucket events

func (*ZiplineeBitbucketTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineeBitbucketTrigger fires for an ZiplineeBitbucketEvent

func (*ZiplineeBitbucketTrigger) SetDefaults added in v0.0.2

func (p *ZiplineeBitbucketTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineeBitbucketTrigger

func (*ZiplineeBitbucketTrigger) Validate added in v0.0.2

func (p *ZiplineeBitbucketTrigger) Validate() (err error)

Validate checks if ZiplineeBitbucketTrigger is valid

type ZiplineeBot added in v0.0.2

type ZiplineeBot struct {
	Name            string             `yaml:"-"`
	Builder         *ZiplineeBuilder   `yaml:"builder,omitempty"`
	CloneRepository *bool              `yaml:"clone,omitempty" json:",omitempty"`
	Triggers        []*ZiplineeTrigger `yaml:"triggers,omitempty" json:",omitempty"`
	Stages          []*ZiplineeStage   `yaml:"-" json:",omitempty"`
}

ZiplineeBot allows to respond to any event coming from one of the integrations

func (*ZiplineeBot) MarshalYAML added in v0.0.2

func (bot *ZiplineeBot) MarshalYAML() (out interface{}, err error)

MarshalYAML customizes marshalling an ZiplineeBot

func (*ZiplineeBot) UnmarshalYAML added in v0.0.2

func (bot *ZiplineeBot) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeBot

type ZiplineeBuilder added in v0.0.2

type ZiplineeBuilder struct {
	Track           string          `yaml:"track,omitempty"`
	OperatingSystem OperatingSystem `yaml:"os,omitempty"`
	StorageMedium   StorageMedium   `yaml:"medium,omitempty"`
	BuilderType     BuilderType     `yaml:"type,omitempty"`
}

ZiplineeBuilder contains configuration for the ci-builder component

func (*ZiplineeBuilder) SetDefaults added in v0.0.2

func (builder *ZiplineeBuilder) SetDefaults(preferences ZiplineeManifestPreferences)

SetDefaults sets default values for properties of ZiplineeBuilder if not defined

func (*ZiplineeBuilder) UnmarshalYAML added in v0.0.2

func (builder *ZiplineeBuilder) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeBuilder

type ZiplineeCronEvent added in v0.0.2

type ZiplineeCronEvent struct {
	Time time.Time `yaml:"time,omitempty" json:"time,omitempty"`
}

ZiplineeCronEvent fires at intervals specified by the cron expression

type ZiplineeCronTrigger added in v0.0.2

type ZiplineeCronTrigger struct {
	Schedule string `yaml:"schedule,omitempty" json:"schedule,omitempty"`
}

ZiplineeCronTrigger fires at intervals specified by the cron schedule

func (*ZiplineeCronTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineeCronTrigger fires for an ZiplineeCronEvent

func (*ZiplineeCronTrigger) SetDefaults added in v0.0.2

func (c *ZiplineeCronTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineeCronTrigger

func (*ZiplineeCronTrigger) Validate added in v0.0.2

func (c *ZiplineeCronTrigger) Validate() (err error)

Validate checks if ZiplineeCronTrigger is valid

type ZiplineeCustomVersion added in v0.0.2

type ZiplineeCustomVersion struct {
	LabelTemplate string `yaml:"labelTemplate"`
}

ZiplineeCustomVersion represents a custom version using a template

func (*ZiplineeCustomVersion) Version added in v0.0.2

Version returns the version number as a string

type ZiplineeDockerEvent added in v0.0.2

type ZiplineeDockerEvent struct {
	Event string `yaml:"event,omitempty" json:"event,omitempty"`
	Image string `yaml:"image,omitempty" json:"image,omitempty"`
	Tag   string `yaml:"tag,omitempty" json:"tag,omitempty"`
}

ZiplineeDockerEvent fires for docker image changes

type ZiplineeDockerTrigger added in v0.0.2

type ZiplineeDockerTrigger struct {
	Event string `yaml:"event,omitempty" json:"event,omitempty"`
	Image string `yaml:"image,omitempty" json:"image,omitempty"`
	Tag   string `yaml:"tag,omitempty" json:"tag,omitempty"`
}

ZiplineeDockerTrigger fires for docker image changes and applies filtering to limit when this results in an action

func (*ZiplineeDockerTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineeDockerTrigger fires for an ZiplineeDockerEvent

func (*ZiplineeDockerTrigger) SetDefaults added in v0.0.2

func (d *ZiplineeDockerTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineeDockerTrigger

func (*ZiplineeDockerTrigger) Validate added in v0.0.2

func (d *ZiplineeDockerTrigger) Validate() (err error)

Validate checks if ZiplineeDockerTrigger is valid

type ZiplineeEvent added in v0.0.2

type ZiplineeEvent struct {
	Name      string                  `yaml:"name,omitempty" json:"name,omitempty"`
	Fired     bool                    `yaml:"fired,omitempty" json:"fired,omitempty"`
	Pipeline  *ZiplineePipelineEvent  `yaml:"pipeline,omitempty" json:"pipeline,omitempty"`
	Release   *ZiplineeReleaseEvent   `yaml:"release,omitempty" json:"release,omitempty"`
	Git       *ZiplineeGitEvent       `yaml:"git,omitempty" json:"git,omitempty"`
	Docker    *ZiplineeDockerEvent    `yaml:"docker,omitempty" json:"docker,omitempty"`
	Cron      *ZiplineeCronEvent      `yaml:"cron,omitempty" json:"cron,omitempty"`
	PubSub    *ZiplineePubSubEvent    `yaml:"pubsub,omitempty" json:"pubsub,omitempty"`
	Github    *ZiplineeGithubEvent    `yaml:"github,omitempty" json:"github,omitempty"`
	Bitbucket *ZiplineeBitbucketEvent `yaml:"bitbucket,omitempty" json:"bitbucket,omitempty"`
	Manual    *ZiplineeManualEvent    `yaml:"manual,omitempty" json:"manual,omitempty"`
}

ZiplineeEvent is a container for any trigger event

type ZiplineeGitEvent added in v0.0.2

type ZiplineeGitEvent struct {
	Event      string `yaml:"event,omitempty" json:"event,omitempty"`
	Repository string `yaml:"repository,omitempty" json:"repository,omitempty"`
	Branch     string `yaml:"branch,omitempty" json:"branch,omitempty"`
}

ZiplineeGitEvent fires for git repository changes

type ZiplineeGitTrigger added in v0.0.2

type ZiplineeGitTrigger struct {
	Event      string `yaml:"event,omitempty" json:"event,omitempty"`
	Repository string `yaml:"repository,omitempty" json:"repository,omitempty"`
	Branch     string `yaml:"branch,omitempty" json:"branch,omitempty"`
}

ZiplineeGitTrigger fires for git repository changes and applies filtering to limit when this results in an action

func (*ZiplineeGitTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineeGitTrigger fires for an ZiplineeGitEvent

func (*ZiplineeGitTrigger) SetDefaults added in v0.0.2

func (g *ZiplineeGitTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineeGitTrigger

func (*ZiplineeGitTrigger) Validate added in v0.0.2

func (g *ZiplineeGitTrigger) Validate() (err error)

Validate checks if ZiplineeGitTrigger is valid

type ZiplineeGithubEvent added in v0.0.2

type ZiplineeGithubEvent struct {
	Event      string `yaml:"event,omitempty" json:"event,omitempty"`
	Repository string `yaml:"repository,omitempty" json:"repository,omitempty"`
	Delivery   string `yaml:"delivery,omitempty" json:"delivery,omitempty"`
	Payload    string `yaml:"payload,omitempty" json:"payload,omitempty"`
}

ZiplineeGithubEvent fires for github events

type ZiplineeGithubTrigger added in v0.0.2

type ZiplineeGithubTrigger struct {
	Events     []string `yaml:"events,omitempty" json:"events,omitempty"`
	Repository string   `yaml:"repository,omitempty" json:"repository,omitempty"`
}

ZiplineeGithubTrigger fires for github events

func (*ZiplineeGithubTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineeGithubTrigger fires for an ZiplineeGithubEvent

func (*ZiplineeGithubTrigger) SetDefaults added in v0.0.2

func (p *ZiplineeGithubTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineeGithubTrigger

func (*ZiplineeGithubTrigger) Validate added in v0.0.2

func (p *ZiplineeGithubTrigger) Validate() (err error)

Validate checks if ZiplineeGithubTrigger is valid

type ZiplineeManifest added in v0.0.2

type ZiplineeManifest struct {
	Archived         bool                       `yaml:"archived,omitempty"`
	Builder          ZiplineeBuilder            `yaml:"builder,omitempty"`
	Labels           map[string]string          `yaml:"labels,omitempty"`
	Version          ZiplineeVersion            `yaml:"version,omitempty"`
	GlobalEnvVars    map[string]string          `yaml:"env,omitempty"`
	Triggers         []*ZiplineeTrigger         `yaml:"triggers,omitempty"`
	Stages           []*ZiplineeStage           `yaml:"-"`
	Releases         []*ZiplineeRelease         `yaml:"-"`
	ReleaseTemplates []*ZiplineeReleaseTemplate `yaml:"-"`
	Bots             []*ZiplineeBot             `yaml:"-"`
}

ZiplineeManifest is the object that the .ziplinee.yaml deserializes to

func ReadManifest

func ReadManifest(preferences *ZiplineeManifestPreferences, manifestString string, validate bool) (manifest ZiplineeManifest, err error)

ReadManifest reads the string representation of .ziplinee.yaml into an ZiplineeManifest object

func ReadManifestFromFile

func ReadManifestFromFile(preferences *ZiplineeManifestPreferences, manifestPath string, validate bool) (manifest ZiplineeManifest, err error)

ReadManifestFromFile reads the .ziplinee.yaml into an ZiplineeManifest object

func (*ZiplineeManifest) DeepCopy added in v0.0.2

func (c *ZiplineeManifest) DeepCopy() (target ZiplineeManifest)

DeepCopy provides a copy of all nested pointers

func (*ZiplineeManifest) GetAllTriggers added in v0.0.2

func (c *ZiplineeManifest) GetAllTriggers(repoSource, repoOwner, repoName string) []ZiplineeTrigger

GetAllTriggers returns both build and release triggers as one list

func (ZiplineeManifest) MarshalYAML added in v0.0.2

func (c ZiplineeManifest) MarshalYAML() (out interface{}, err error)

MarshalYAML customizes marshalling an ZiplineeManifest

func (*ZiplineeManifest) SetDefaults added in v0.0.2

func (c *ZiplineeManifest) SetDefaults(preferences ZiplineeManifestPreferences)

SetDefaults sets default values for properties of ZiplineeManifest if not defined

func (*ZiplineeManifest) UnmarshalYAML added in v0.0.2

func (c *ZiplineeManifest) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeManifest

func (*ZiplineeManifest) Validate added in v0.0.2

func (c *ZiplineeManifest) Validate(preferences ZiplineeManifestPreferences) (err error)

Validate checks if the manifest is valid

type ZiplineeManifestPreferences added in v0.0.2

type ZiplineeManifestPreferences struct {
	LabelRegexes                    map[string]string            `yaml:"labelRegexes,omitempty" json:"labelRegexes,omitempty"`
	BuilderOperatingSystems         []OperatingSystem            `yaml:"builderOperatingSystems,omitempty" json:"builderOperatingSystems,omitempty"`
	BuilderTracksPerOperatingSystem map[OperatingSystem][]string `yaml:"builderTracksPerOperatingSystem,omitempty" json:"builderTracksPerOperatingSystem,omitempty"`
	DefaultBranch                   string                       `yaml:"defaultBranch,omitempty" json:"defaultBranch,omitempty"`
}

ZiplineeManifestPreferences is used to configure validation rules for the manifest

func GetDefaultManifestPreferences

func GetDefaultManifestPreferences() (preferences *ZiplineeManifestPreferences)

GetDefaultManifestPreferences returns default preferences if not configured at the server

func (*ZiplineeManifestPreferences) SetDefaults added in v0.0.2

func (p *ZiplineeManifestPreferences) SetDefaults()

type ZiplineeManualEvent added in v0.0.2

type ZiplineeManualEvent struct {
	UserID string `yaml:"userID,omitempty" json:"userID,omitempty"`
}

ZiplineeManualEvent fires when a user manually triggers a build or release

type ZiplineePipelineEvent added in v0.0.2

type ZiplineePipelineEvent struct {
	BuildVersion string `yaml:"buildVersion,omitempty" json:"buildVersion,omitempty"`
	RepoSource   string `yaml:"repoSource,omitempty" json:"repoSource,omitempty"`
	RepoOwner    string `yaml:"repoOwner,omitempty" json:"repoOwner,omitempty"`
	RepoName     string `yaml:"repoName,omitempty" json:"repoName,omitempty"`
	Branch       string `yaml:"repoBranch,omitempty" json:"repoBranch,omitempty"`
	Status       string `yaml:"status,omitempty" json:"status,omitempty"`
	Event        string `yaml:"event,omitempty" json:"event,omitempty"`
}

ZiplineePipelineEvent fires for pipeline changes

type ZiplineePipelineTrigger added in v0.0.2

type ZiplineePipelineTrigger struct {
	Event  string `yaml:"event,omitempty" json:"event,omitempty"`
	Status string `yaml:"status,omitempty" json:"status,omitempty"`
	Name   string `yaml:"name,omitempty" json:"name,omitempty"`
	Branch string `yaml:"branch,omitempty" json:"branch,omitempty"`
}

ZiplineePipelineTrigger fires for pipeline changes and applies filtering to limit when this results in an action

func (*ZiplineePipelineTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineePipelineTrigger fires for an ZiplineePipelineEvent

func (*ZiplineePipelineTrigger) SetDefaults added in v0.0.2

func (p *ZiplineePipelineTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineePipelineTrigger

func (*ZiplineePipelineTrigger) Validate added in v0.0.2

func (p *ZiplineePipelineTrigger) Validate() (err error)

Validate checks if ZiplineePipelineTrigger is valid

type ZiplineePubSubEvent added in v0.0.2

type ZiplineePubSubEvent struct {
	Project string        `yaml:"project,omitempty" json:"project,omitempty"`
	Topic   string        `yaml:"topic,omitempty" json:"topic,omitempty"`
	Message PubsubMessage `yaml:"message,omitempty" json:"message,omitempty"`
}

ZiplineePubSubEvent fires when a subscribed pubsub topic receives an event

type ZiplineePubSubTrigger added in v0.0.2

type ZiplineePubSubTrigger struct {
	Project string `yaml:"project,omitempty" json:"project,omitempty"`
	Topic   string `yaml:"topic,omitempty" json:"topic,omitempty"`
}

ZiplineePubSubTrigger fires for pubsub events in a certain project and topic

func (*ZiplineePubSubTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineePubSubTrigger fires for an ZiplineePubSubEvent

func (*ZiplineePubSubTrigger) SetDefaults added in v0.0.2

func (p *ZiplineePubSubTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineePubSubTrigger

func (*ZiplineePubSubTrigger) Validate added in v0.0.2

func (p *ZiplineePubSubTrigger) Validate() (err error)

Validate checks if ZiplineePubSubTrigger is valid

type ZiplineeRelease added in v0.0.2

type ZiplineeRelease struct {
	Name            string                   `yaml:"-"`
	Builder         *ZiplineeBuilder         `yaml:"builder,omitempty"`
	CloneRepository *bool                    `yaml:"clone,omitempty" json:",omitempty"`
	Actions         []*ZiplineeReleaseAction `yaml:"actions,omitempty" json:",omitempty"`
	Triggers        []*ZiplineeTrigger       `yaml:"triggers,omitempty" json:",omitempty"`
	Stages          []*ZiplineeStage         `yaml:"-" json:",omitempty"`
	Template        string                   `yaml:"template,omitempty"`
}

ZiplineeRelease represents a release target that in itself contains one or multiple stages

func (ZiplineeRelease) DeepCopy added in v0.0.2

func (release ZiplineeRelease) DeepCopy() (target ZiplineeRelease)

DeepCopy provides a copy of all nested pointers

func (*ZiplineeRelease) InitFromTemplate added in v0.0.2

func (release *ZiplineeRelease) InitFromTemplate(releaseTemplates map[string]*ZiplineeReleaseTemplate)

InitFromTemplate uses template values for

func (ZiplineeRelease) MarshalYAML added in v0.0.2

func (release ZiplineeRelease) MarshalYAML() (out interface{}, err error)

MarshalYAML customizes marshalling an ZiplineeManifest

func (*ZiplineeRelease) UnmarshalYAML added in v0.0.2

func (release *ZiplineeRelease) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeRelease

type ZiplineeReleaseAction added in v0.0.2

type ZiplineeReleaseAction struct {
	Name      string `yaml:"name" json:"name"`
	HideBadge bool   `yaml:"hideBadge,omitempty" json:"hideBadge,omitempty"`
}

ZiplineeReleaseAction represents an action on a release target that controls what happens by running the release stage

type ZiplineeReleaseEvent added in v0.0.2

type ZiplineeReleaseEvent struct {
	ReleaseVersion string `yaml:"releaseVersion,omitempty" json:"releaseVersion,omitempty"`
	RepoSource     string `yaml:"repoSource,omitempty" json:"repoSource,omitempty"`
	RepoOwner      string `yaml:"repoOwner,omitempty" json:"repoOwner,omitempty"`
	RepoName       string `yaml:"repoName,omitempty" json:"repoName,omitempty"`
	Target         string `yaml:"target,omitempty" json:"target,omitempty"`
	Status         string `yaml:"status,omitempty" json:"status,omitempty"`
	Event          string `yaml:"event,omitempty" json:"event,omitempty"`
}

ZiplineeReleaseEvent fires for pipeline releases

type ZiplineeReleaseTemplate added in v0.0.2

type ZiplineeReleaseTemplate struct {
	Name            string                   `yaml:"-"`
	Builder         *ZiplineeBuilder         `yaml:"builder,omitempty"`
	CloneRepository *bool                    `yaml:"clone,omitempty" json:",omitempty"`
	Actions         []*ZiplineeReleaseAction `yaml:"actions,omitempty" json:",omitempty"`
	Triggers        []*ZiplineeTrigger       `yaml:"triggers,omitempty" json:",omitempty"`
	Stages          []*ZiplineeStage         `yaml:"-"`
}

ZiplineeReleaseTemplate represents a template for a release target

func (ZiplineeReleaseTemplate) DeepCopy added in v0.0.2

func (releaseTemplate ZiplineeReleaseTemplate) DeepCopy() (target ZiplineeReleaseTemplate)

DeepCopy provides a copy of all nested pointers

func (ZiplineeReleaseTemplate) MarshalYAML added in v0.0.2

func (releaseTemplate ZiplineeReleaseTemplate) MarshalYAML() (out interface{}, err error)

MarshalYAML customizes marshalling an ZiplineeManifest

func (*ZiplineeReleaseTemplate) UnmarshalYAML added in v0.0.2

func (releaseTemplate *ZiplineeReleaseTemplate) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeRelease

type ZiplineeReleaseTrigger added in v0.0.2

type ZiplineeReleaseTrigger struct {
	Event  string `yaml:"event,omitempty" json:"event,omitempty"`
	Status string `yaml:"status,omitempty" json:"status,omitempty"`
	Name   string `yaml:"name,omitempty" json:"name,omitempty"`
	Target string `yaml:"target,omitempty" json:"target,omitempty"`
}

ZiplineeReleaseTrigger fires for pipeline releases and applies filtering to limit when this results in an action

func (*ZiplineeReleaseTrigger) Fires added in v0.0.2

Fires indicates whether ZiplineeReleaseTrigger fires for an ZiplineeReleaseEvent

func (*ZiplineeReleaseTrigger) SetDefaults added in v0.0.2

func (r *ZiplineeReleaseTrigger) SetDefaults()

SetDefaults sets defaults for ZiplineeReleaseTrigger

func (*ZiplineeReleaseTrigger) Validate added in v0.0.2

func (r *ZiplineeReleaseTrigger) Validate() (err error)

Validate checks if ZiplineeReleaseTrigger is valid

type ZiplineeSemverVersion added in v0.0.2

type ZiplineeSemverVersion struct {
	Major         int                 `yaml:"major"`
	Minor         int                 `yaml:"minor"`
	Patch         string              `yaml:"patch"`
	LabelTemplate string              `yaml:"labelTemplate"`
	ReleaseBranch StringOrStringArray `yaml:"releaseBranch"`
}

ZiplineeSemverVersion represents semantic versioning (http://semver.org/)

func (*ZiplineeSemverVersion) GetLabel added in v0.0.2

GetLabel returns the formatted label

func (*ZiplineeSemverVersion) GetPatch added in v0.0.2

GetPatch returns the formatted patch

func (*ZiplineeSemverVersion) GetPatchWithLabel added in v0.0.2

func (v *ZiplineeSemverVersion) GetPatchWithLabel(params ZiplineeVersionParams) string

GetPatchWithLabel returns the formatted patch and label

func (*ZiplineeSemverVersion) Version added in v0.0.2

Version returns the version number as a string

type ZiplineeService added in v0.0.2

type ZiplineeService struct {
	Name                    string                 `yaml:"name,omitempty"`
	ContainerImage          string                 `yaml:"image,omitempty"`
	Shell                   string                 `yaml:"shell,omitempty"`
	Commands                []string               `yaml:"commands,omitempty"`
	RunCommandsInForeground bool                   `yaml:"runCommandsInForeground,omitempty"`
	MultiStage              *bool                  `yaml:"multiStage,omitempty"`
	When                    string                 `yaml:"when,omitempty"`
	EnvVars                 map[string]string      `yaml:"env,omitempty"`
	Readiness               *ReadinessProbe        `yaml:"readiness,omitempty"`
	ReadinessProbe          *ReadinessProbe        `yaml:"readinessProbe,omitempty"`
	CustomProperties        map[string]interface{} `yaml:",inline"`
}

ZiplineeService represents a service container to run during a single or multiple stages

func (*ZiplineeService) SetDefaults added in v0.0.2

func (service *ZiplineeService) SetDefaults(builder ZiplineeBuilder, parentStage ZiplineeStage)

SetDefaults sets default values for properties of ZiplineeService if not defined

func (*ZiplineeService) UnmarshalYAML added in v0.0.2

func (service *ZiplineeService) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeService

type ZiplineeStage added in v0.0.2

type ZiplineeStage struct {
	Name                    string                 `yaml:"-" json:",omitempty"`
	ContainerImage          string                 `yaml:"image,omitempty" json:",omitempty"`
	Shell                   string                 `yaml:"shell,omitempty" json:",omitempty"`
	WorkingDirectory        string                 `yaml:"workDir,omitempty" json:",omitempty"`
	Commands                []string               `yaml:"commands,omitempty" json:",omitempty"`
	RunCommandsInForeground bool                   `yaml:"runCommandsInForeground,omitempty" json:",omitempty"`
	When                    string                 `yaml:"when,omitempty" json:",omitempty"`
	EnvVars                 map[string]string      `yaml:"env,omitempty" json:",omitempty"`
	AutoInjected            bool                   `yaml:"autoInjected,omitempty" json:",omitempty"`
	ParallelStages          []*ZiplineeStage       `yaml:"parallelStages,omitempty" json:",omitempty"`
	Services                []*ZiplineeService     `yaml:"services,omitempty" json:",omitempty"`
	CustomProperties        map[string]interface{} `yaml:",inline" json:",omitempty"`
}

ZiplineeStage represents a stage of a build pipeline or release

func (*ZiplineeStage) SetDefaults added in v0.0.2

func (stage *ZiplineeStage) SetDefaults(builder ZiplineeBuilder)

SetDefaults sets default values for properties of ZiplineeStage if not defined

func (*ZiplineeStage) UnmarshalYAML added in v0.0.2

func (stage *ZiplineeStage) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeStage

func (*ZiplineeStage) Validate added in v0.0.2

func (stage *ZiplineeStage) Validate() (err error)

Validate checks whether the stage has valid parameters

type ZiplineeTrigger added in v0.0.2

type ZiplineeTrigger struct {
	Name      string                    `yaml:"name,omitempty" json:"name,omitempty"`
	Pipeline  *ZiplineePipelineTrigger  `yaml:"pipeline,omitempty" json:"pipeline,omitempty"`
	Release   *ZiplineeReleaseTrigger   `yaml:"release,omitempty" json:"release,omitempty"`
	Git       *ZiplineeGitTrigger       `yaml:"git,omitempty" json:"git,omitempty"`
	Docker    *ZiplineeDockerTrigger    `yaml:"docker,omitempty" json:"docker,omitempty"`
	Cron      *ZiplineeCronTrigger      `yaml:"cron,omitempty" json:"cron,omitempty"`
	PubSub    *ZiplineePubSubTrigger    `yaml:"pubsub,omitempty" json:"pubsub,omitempty"`
	Github    *ZiplineeGithubTrigger    `yaml:"github,omitempty" json:"github,omitempty"`
	Bitbucket *ZiplineeBitbucketTrigger `yaml:"bitbucket,omitempty" json:"bitbucket,omitempty"`

	BuildAction   *ZiplineeTriggerBuildAction   `yaml:"builds,omitempty" json:"builds,omitempty"`
	ReleaseAction *ZiplineeTriggerReleaseAction `yaml:"releases,omitempty" json:"releases,omitempty"`
	BotAction     *ZiplineeTriggerBotAction     `yaml:"runs,omitempty" json:"runs,omitempty"`
}

ZiplineeTrigger represents a trigger of any supported type and what action to take if the trigger fired

func (*ZiplineeTrigger) ReplaceSelf added in v0.0.2

func (t *ZiplineeTrigger) ReplaceSelf(pipeline string)

ReplaceSelf replaces pipeline names set to "self" with the actual pipeline name

func (*ZiplineeTrigger) SetDefaults added in v0.0.2

func (t *ZiplineeTrigger) SetDefaults(preferences ZiplineeManifestPreferences, triggerType TriggerType, targetName string)

SetDefaults sets defaults for ZiplineeTrigger

func (*ZiplineeTrigger) Validate added in v0.0.2

func (t *ZiplineeTrigger) Validate(triggerType TriggerType, targetName string) (err error)

Validate checks if ZiplineeTrigger is valid

type ZiplineeTriggerBotAction added in v0.0.2

type ZiplineeTriggerBotAction struct {
	Bot    string `yaml:"bot,omitempty" json:"bot,omitempty"`
	Branch string `yaml:"branch,omitempty" json:"branch,omitempty"`
}

func (*ZiplineeTriggerBotAction) SetDefaults added in v0.0.2

func (b *ZiplineeTriggerBotAction) SetDefaults(preferences ZiplineeManifestPreferences, botName string)

SetDefaults sets defaults for ZiplineeTriggerReleaseAction

func (*ZiplineeTriggerBotAction) Validate added in v0.0.2

func (b *ZiplineeTriggerBotAction) Validate() (err error)

Validate checks if ZiplineeTriggerBotAction is valid

type ZiplineeTriggerBuildAction added in v0.0.2

type ZiplineeTriggerBuildAction struct {
	Branch string `yaml:"branch,omitempty" json:"branch,omitempty"`
}

ZiplineeTriggerBuildAction determines what builds when the trigger fires

func (*ZiplineeTriggerBuildAction) SetDefaults added in v0.0.2

func (b *ZiplineeTriggerBuildAction) SetDefaults(preferences ZiplineeManifestPreferences)

SetDefaults sets defaults for ZiplineeTriggerBuildAction

func (*ZiplineeTriggerBuildAction) Validate added in v0.0.2

func (b *ZiplineeTriggerBuildAction) Validate() (err error)

Validate checks if ZiplineeTriggerBuildAction is valid

type ZiplineeTriggerReleaseAction added in v0.0.2

type ZiplineeTriggerReleaseAction struct {
	Target  string `yaml:"target,omitempty" json:"target,omitempty"`
	Action  string `yaml:"action,omitempty" json:"action,omitempty"`
	Version string `yaml:"version,omitempty" json:"version,omitempty"`
}

ZiplineeTriggerReleaseAction determines what releases when the trigger fires

func (*ZiplineeTriggerReleaseAction) SetDefaults added in v0.0.2

func (r *ZiplineeTriggerReleaseAction) SetDefaults(t *ZiplineeTrigger, targetName string)

SetDefaults sets defaults for ZiplineeTriggerReleaseAction

func (*ZiplineeTriggerReleaseAction) Validate added in v0.0.2

func (r *ZiplineeTriggerReleaseAction) Validate(targetName string) (err error)

Validate checks if ZiplineeTriggerReleaseAction is valid

type ZiplineeVersion added in v0.0.2

type ZiplineeVersion struct {
	SemVer *ZiplineeSemverVersion `yaml:"semver,omitempty" json:",omitempty"`
	Custom *ZiplineeCustomVersion `yaml:"custom,omitempty" json:",omitempty"`
}

ZiplineeVersion is the object that determines how version numbers are generated

func (*ZiplineeVersion) SetDefaults added in v0.0.2

func (version *ZiplineeVersion) SetDefaults()

SetDefaults sets default values for properties of ZiplineeVersion if not defined

func (*ZiplineeVersion) UnmarshalYAML added in v0.0.2

func (version *ZiplineeVersion) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

UnmarshalYAML customizes unmarshalling an ZiplineeVersion

func (*ZiplineeVersion) Version added in v0.0.2

func (version *ZiplineeVersion) Version(params ZiplineeVersionParams) string

Version returns the version number as a string

type ZiplineeVersionParams added in v0.0.2

type ZiplineeVersionParams struct {
	AutoIncrement int
	Branch        string
	Revision      string
}

ZiplineeVersionParams contains parameters used to generate a version number

func (*ZiplineeVersionParams) GetFuncMap added in v0.0.2

func (p *ZiplineeVersionParams) GetFuncMap() template.FuncMap

GetFuncMap returns ZiplineeVersionParams as a function map for use in templating

Jump to

Keyboard shortcuts

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