Documentation ¶
Index ¶
- Constants
- type ApproverInput
- type Approvers
- type BytesSize
- type CI
- type Cache
- type Codebase
- type Config
- type Duration
- type Exclusion
- type Execution
- type ExecutionTarget
- type ImagePullPolicy
- type InfraSpec
- type InfraType
- type Infrastructure
- type Limits
- type MilliSize
- type Parallelism
- type Pipeline
- type Platform
- type Properties
- type Repeat
- type Report
- type ReportJunit
- type Resources
- type Runtime
- type Service
- type ServiceSpec
- type Shell
- type Source
- type SourceSpec
- type Stage
- type StageApproval
- type StageCI
- type StageDeployment
- type StageFeatureFlag
- type StageType
- type StageWhen
- type Stages
- type Step
- type StepAction
- type StepArtifactoryUpload
- type StepBackground
- type StepBarrier
- type StepBitrise
- type StepBuildAndPushECR
- type StepBuildAndPushGCR
- type StepDocker
- type StepFlagConfiguration
- type StepGCSUpload
- type StepHTTP
- type StepHarnessApproval
- type StepPlugin
- type StepRestoreCacheGCS
- type StepRestoreCacheS3
- type StepRun
- type StepRunTests
- type StepS3Upload
- type StepSaveCacheGCS
- type StepSaveCacheS3
- type StepScript
- type StepType
- type StepWhen
- type Steps
- type Strategy
- type Variable
- type WhenStatus
Constants ¶
const ( WhenStatusNone WhenStatus = "None" WhenStatusAll = "All" WhenStatusFailure = "Failure" WhenStatusSuccess = "Success" )
const ( StageTypeNone StageType = "None" StageTypeApproval = "Approval" StageTypeCI = "CI" StageTypeDeployment = "Deployment" StageTypeFeatureFlag = "FeatureFlag" )
const ( InfraTypeNone InfraType = "None" InfraTypeKubernetesDirect = "KubernetesDirect" InfraTypeUseFromStage = "UseFromStage" InfraTypeVM = "VM" )
const ( StepTypeNone StepType = "None" // Continuous Integration StepTypeAction = "Action" StepTypeArtifactoryUpdload = "ArtifactoryUpload" StepTypeBarrier = "Barrier" StepTypeBackground = "Background" StepTypeBitrise = "Bitrise" StepTypeBuildAndPushDockerRegistry = "BuildAndPushDockerRegistry" StepTypeBuildAndPushECR = "BuildAndPushECR" StepTypeBuildAndPushGCR = "BuildAndPushGCR" StepTypeFlagConfiguration = "FlagConfiguration" StepTypeGCSUpload = "GCSUpload" StepTypeHarnessApproval = "HarnessApproval" StepTypePlugin = "Plugin" StepTypeRestoreCacheGCS = "RestoreCacheGCS" StepTypeRestoreCacheS3 = "RestoreCacheS3" StepTypeRun = "Run" StepTypeRunTests = "RunTests" StepTypeS3Upload = "S3Upload" StepTypeSaveCacheGCS = "SaveCacheGCS" StepTypeSaveCacheS3 = "SaveCacheS3" // Feature Flags StepTypeHTTP = "Http" StepTypeJiraApproval = "JiraApproval" StepTypeJiraCreate = "JiraCreate" StepTypeJiraUpdate = "JiraUpdate" StepTypeServiceNowApproval = "ServiceNowApproval" StepTypeShellScript = "ShellScript" // Approval StepTypeVerify = "Verify" )
const ( ShellNone Shell = "None" ShellBash = "Bash" ShellPosix = "Shell" ShellPowershell = "Powershell" )
const ( ImagePullNone ImagePullPolicy = "None" ImagePullAlways = "Always" ImagePullIfNotPresent = "IfNotPresent" ImagePullNever = "Never" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApproverInput ¶
type BytesSize ¶
type BytesSize int64
BytesSize stores a human-readable size in bytes, kibibytes, mebibytes, gibibytes, or tebibytes (eg. "44kiB", "17MiB").
func (*BytesSize) MarshalJSON ¶
MarshalJSON makes UnitBytes implement json.Marshaler
func (BytesSize) String ¶
String returns a human-readable size in bytes, kibibytes, mebibytes, gibibytes, or tebibytes (eg. "44kiB", "17MiB").
func (*BytesSize) UnmarshalJSON ¶
UnmarshalJSON implements json unmarshalling.
func (*BytesSize) UnmarshalYAML ¶
UnmarshalYAML implements yaml unmarshalling.
type CI ¶
type CI struct {
Codebase Codebase `json:"codebase,omitempty" yaml:"codebase,omitempty"`
}
CI defines CI pipeline properties.
type Cache ¶
type Cache struct { Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` Key string `json:"key,omitempty" yaml:"key,omitempty"` Paths []string `json:"paths,omitempty" yaml:"paths,omitempty"` }
Cache defines the cache settings.
type Codebase ¶
type Codebase struct { Name string `json:"repoName,omitempty" yaml:"repoName,omitempty"` Conn string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Build string `json:"build,omitempty" yaml:"build,omitempty"` // branch|tag }
Codebase defines a codebase.
type Config ¶
type Config struct {
Pipeline Pipeline `json:"pipeline" yaml:"pipeline"`
}
Config defines resource configuration.
func ParseBytes ¶
ParseBytes parses the configuration from bytes b.
func ParseString ¶
ParseString parses the configuration from string s.
type Duration ¶
Duration is a wrapper around time.Duration which supports correct marshaling to YAML and JSON. In particular, it marshals into strings, which can be used as map keys in json.
func (Duration) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaller interface.
type Execution ¶
type Execution struct {
Steps []*Steps `json:"steps,omitempty" yaml:"steps,omitempty"` // Un-necessary
}
type ExecutionTarget ¶
type ImagePullPolicy ¶
type ImagePullPolicy string
type InfraSpec ¶
type InfraSpec struct { Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` Conn string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` }
InfraSpec describes pipeline infastructure.
type Infrastructure ¶
type Infrastructure struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` From string `json:"useFromStage,omitempty" yaml:"useFromStage,omitempty"` // this is also weird Spec *InfraSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
Infrastructure provides pipeline infrastructure.
type MilliSize ¶
type MilliSize int64
MilliSize will convert cpus to millicpus as int64. for instance "1" will be converted to 1000 and "100m" to 100
func (*MilliSize) MarshalJSON ¶
MarshalJSON makes implements json.Marshaler
func (*MilliSize) UnmarshalJSON ¶
UnmarshalJSON implements json unmarshalling.
func (*MilliSize) UnmarshalYAML ¶
UnmarshalYAML implements yaml unmarshalling.
type Parallelism ¶
type Pipeline ¶
type Pipeline struct { ID string `json:"identifier,omitempty" yaml:"identifier,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Desc string `json:"description,omitempty" yaml:"description,omitempty"` Account string `json:"accountIdentifier,omitempty" yaml:"accountIdentifier,omitempty"` Project string `json:"projectIdentifier,omitempty" yaml:"projectIdentifier,omitempty"` Org string `json:"orgIdentifier,omitempty" yaml:"orgIdentifier,omitempty"` Props Properties `json:"properties,omitempty" yaml:"properties,omitempty"` Stages []*Stages `json:"stages,omitempty" yaml:"stages"` Variables []*Variable `json:"variables,omitempty" yaml:"variables,omitempty"` }
Pipeline defines a pipeline.
type Properties ¶
type Properties struct {
CI CI `json:"ci,omitempty" yaml:"ci"`
}
Properties defines pipeline properties.
type Report ¶
type Report struct { Type string `json:"type" yaml:"type,omitempty"` // JUnit|JUnit Spec *ReportJunit `json:"spec" yaml:"spec,omitempty"` // TODO }
type ReportJunit ¶
type ReportJunit struct {
Paths []string `json:"paths" yaml:"paths,omitempty"`
}
type Resources ¶
type Resources struct {
Limits Limits `json:"limits,omitempty" yaml:"limits,omitempty"`
}
type Runtime ¶
type Runtime struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Spec interface{} `json:"spec,omitempty" yaml:"spec,omitempty"` }
type Service ¶
type Service struct { ID string `json:"identifier,omitempty" yaml:"identifier,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` // Service Desc string `json:"description,omitempty" yaml:"description,omitempty"` Spec *ServiceSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
type ServiceSpec ¶
type ServiceSpec struct { Env map[string]string `json:"envVariables,omitempty" yaml:"envVariables,omitempty"` Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"` Args []string `json:"args,omitempty" yaml:"args,omitempty"` Conn string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"` }
type Source ¶
type Source struct { Type string `json:"type,omitempty" yaml:"type,omitempty"` Spec SourceSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
type SourceSpec ¶
type SourceSpec struct {
Script string `json:"script,omitempty" yaml:"script,omitempty"`
}
type Stage ¶
type Stage struct { ID string `json:"identifier,omitempty" yaml:"identifier,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Spec interface{} `json:"spec,omitempty" yaml:"spec,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` Vars []*Variable `json:"variables,omitempty" yaml:"variables,omitempty"` When *StageWhen `json:"when,omitempty" yaml:"when,omitempty"` Strategy *Strategy `json:"strategy,omitempty" yaml:"strategy,omitempty"` }
Stage defines a pipeline stage.
func (*Stage) UnmarshalJSON ¶
UnmarshalJSON implement the json.Unmarshaler interface.
type StageCI ¶
type StageCI struct { Cache *Cache `json:"cache,omitempty" yaml:"cache,omitempty"` Clone bool `json:"cloneCodebase,omitempty" yaml:"cloneCodebase,omitempty"` Execution Execution `json:"execution,omitempty" yaml:"execution,omitempty"` Infrastructure *Infrastructure `json:"infrastructure,omitempty" yaml:"infrastructure,omitempty"` Platform *Platform `json:"platform,omitempty" yaml:"platform,omitempty"` Runtime *Runtime `json:"runtime,omitempty" yaml:"runtime,omitempty"` Services []*Service `json:"serviceDependencies,omitempty" yaml:"serviceDependencies,omitempty"` }
StageCI defines a continuous integration stage.
type StageFeatureFlag ¶
type StageFeatureFlag struct {
Execution *Execution `json:"execution,omitempty" yaml:"execution,omitempty"`
}
StageFeatureFlag defines a feature flag stage.
type Step ¶
type Step struct { ID string `json:"identifier,omitempty" yaml:"identifier,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` Skip string `json:"skipCondition,omitempty" yaml:"skipCondition,omitempty"` Spec interface{} `json:"spec,omitempty" yaml:"spec,omitempty"` Timeout Duration `json:"timeout,omitempty" yaml:"timeout,omitempty"` Type string `json:"type,omitempty" yaml:"type,omitempty"` When *StepWhen `json:"when,omitempty" yaml:"when,omitempty"` Env map[string]string `json:"envVariables,omitempty" yaml:"envVariables,omitempty"` Strategy *Strategy `json:"strategy,omitempty" yaml:"strategy,omitempty"` }
func (*Step) UnmarshalJSON ¶
UnmarshalJSON implement the json.Unmarshaler interface.
type StepAction ¶
type StepArtifactoryUpload ¶
type StepArtifactoryUpload struct { }
type StepBackground ¶
type StepBackground struct { Command string `json:"command,omitempty" yaml:"command,omitempty"` ConnRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Entrypoint []string `json:"entrypoint,omitempty" yaml:"entrypoint,omitempty"` Env map[string]string `json:"envVariables,omitempty" yaml:"envVariables,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` PortBindings map[string]string `json:"portBindings,omitempty" yaml:"portBindings,omitempty"` Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` }
type StepBarrier ¶
type StepBarrier struct { }
type StepBitrise ¶
type StepBuildAndPushECR ¶
type StepBuildAndPushECR struct { }
type StepBuildAndPushGCR ¶
type StepBuildAndPushGCR struct { }
type StepDocker ¶
type StepDocker struct { BuildsArgs map[string]string `json:"buildArgs,omitempty" yaml:"buildArgs,omitempty"` ConnectorRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Context string `json:"context,omitempty" yaml:"context,omitempty"` Dockerfile string `json:"dockerfile,omitempty" yaml:"dockerfile,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Optimize bool `json:"optimize,omitempty" yaml:"optimize,omitempty"` Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` RemoteCacheRepo string `json:"remoteCacheRepo,omitempty" yaml:"remoteCacheRepo,omitempty"` Repo string `json:"repo,omitempty" yaml:"repo,omitempty"` Reports []*Report `json:"reports,omitempty" yaml:"reports,omitempty"` Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"` Target string `json:"target,omitempty" yaml:"target,omitempty"` }
type StepFlagConfiguration ¶
type StepFlagConfiguration struct { }
type StepGCSUpload ¶
type StepGCSUpload struct { }
type StepHTTP ¶
type StepHTTP struct { URL string `json:"url,omitempty" yaml:"url,omitempty"` Method string `json:"method,omitempty" yaml:"method,omitempty"` Headers []*Variable `json:"headers,omitempty" yaml:"headers,omitempty"` OutputVariables []*Variable `json:"outputVariables,omitempty" yaml:"outputVariables,omitempty"` RequestBody string `json:"requestBody,omitempty" yaml:"requestBody,omitempty"` Assertion string `json:"assertion,omitempty" yaml:"assertion,omitempty"` ConnRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` }
type StepHarnessApproval ¶
type StepHarnessApproval struct { ApprovalMessage string `json:"approvalMessage,omitempty" yaml:"approvalMessage,omitempty"` Approvers *Approvers `json:"approvers,omitempty" yaml:"approvers,omitempty"` ApproverInputs []*ApproverInput `json:"approverInputs,omitempty" yaml:"approverInputs,omitempty"` IncludePipelineExecutionHistory string `json:"includePipelineExecutionHistory,omitempty" yaml:"includePipelineExecutionHistory,omitempty"` }
type StepPlugin ¶
type StepPlugin struct { Env map[string]string `json:"envVariables,omitempty" yaml:"envVariables,omitempty"` ConnRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` Reports []*Report `json:"reports,omitempty" yaml:"reports,omitempty"` Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` Settings map[string]interface{} `json:"settings,omitempty" yaml:"settings,omitempty"` }
type StepRestoreCacheGCS ¶
type StepRestoreCacheGCS struct { }
type StepRestoreCacheS3 ¶
type StepRestoreCacheS3 struct { }
type StepRun ¶
type StepRun struct { Env map[string]string `json:"envVariables,omitempty" yaml:"envVariables,omitempty"` Command string `json:"command,omitempty" yaml:"command,omitempty"` ConnRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` Outputs []string `json:"outputVariables,omitempty" yaml:"outputVariables,omitempty"` Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` Reports *Report `json:"reports,omitempty" yaml:"reports,omitempty"` Shell string `json:"shell,omitempty" yaml:"shell,omitempty"` }
type StepRunTests ¶
type StepRunTests struct { }
type StepS3Upload ¶
type StepS3Upload struct { Bucket string `json:"bucket,omitempty" yaml:"bucket,omitempty"` ConnectorRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"` Region string `json:"region,omitempty" yaml:"region,omitempty"` Resources *Resources `json:"resources,omitempty" yaml:"resources,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` SourcePath string `json:"sourcePath,omitempty" yaml:"sourcePath,omitempty"` Target string `json:"target,omitempty" yaml:"target,omitempty"` }
type StepSaveCacheGCS ¶
type StepSaveCacheGCS struct { }
type StepSaveCacheS3 ¶
type StepSaveCacheS3 struct { }
type StepScript ¶
type StepScript struct { DelegateSelectors string `json:"delegateSelectors,omitempty" yaml:"delegateSelectors,omitempty"` EnvironmentVariables []*Variable `json:"environmentVariables,omitempty" yaml:"environmentVariables,omitempty"` ExecutionTarget *ExecutionTarget `json:"executionTarget,omitempty" yaml:"executionTarget,omitempty"` Metadata string `json:"metadata,omitempty" yaml:"metadata,omitempty"` OnDelegate bool `json:"onDelegate,omitempty" yaml:"onDelegate,omitempty"` OutputVariables []*Variable `json:"outputVariables,omitempty" yaml:"outputVariables,omitempty"` Shell string `json:"shell,omitempty" yaml:"shell,omitempty"` // Bash|Powershell Source *Source `json:"source,omitempty" yaml:"source,omitempty"` ConnRef string `json:"connectorRef,omitempty" yaml:"connectorRef,omitempty"` Image string `json:"image,omitempty" yaml:"image,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` RunAsUser string `json:"runAsUser,omitempty" yaml:"runAsUser,omitempty"` }
type Strategy ¶
type Strategy struct { Matrix map[string]interface{} `json:"matrix,omitempty" yaml:"matrix,omitempty"` Parallelism *Parallelism `json:"parallelism,omitempty" yaml:"parallelism,omitempty"` Repeat *Repeat `json:"repeat,omitempty" yaml:"repeat,omitempty"` }
type WhenStatus ¶
type WhenStatus string