Documentation ¶
Index ¶
- type Action
- type ActionParameter
- type Actions
- type ArtifactManager
- type Check
- type Condition
- type ContextRaw
- type ContextType
- type Deployment
- type DeploymentConfig
- type DeploymentConfigValue
- type Deployments
- type ExternalDependencies
- type Graph
- type Hook
- type Job
- type JobRun
- type Jobs
- type Key
- type KeyType
- type Keys
- type Node
- type Notification
- type NotificationType
- type Repositories
- type Repository
- type Requirement
- type Secret
- type Secrets
- type ServiceRequirement
- type Stage
- type Stages
- type Step
- type StepScript
- type StepStatus
- type ValidationResponse
- type Variable
- type Variables
- type Workflow
- type WorkflowRun
- type WorkflowRunResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Parameters map[string]ActionParameter `json:"parameters,omitempty" yaml:"parameters,omitempty"` Requirements []Requirement `json:"requirements,omitempty" yaml:"requirements,omitempty"` Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty"` }
func (Action) GetLocalDependencies ¶
type ActionParameter ¶
type Actions ¶
func (Actions) ExistAction ¶
type ArtifactManager ¶
type ArtifactManager string
func (ArtifactManager) Validate ¶
func (a ArtifactManager) Validate() (ExternalDependencies, error)
type Condition ¶
type ContextRaw ¶
type ContextRaw string
func (ContextRaw) Parse ¶
func (c ContextRaw) Parse() (bool, ContextType, string, error)
type ContextType ¶
type ContextType string
const ( ContextTypeRepository ContextType = "repository" ContextTypeVar ContextType = "var" ContextTypeSecret ContextType = "secret" )
func (ContextType) Validate ¶
func (c ContextType) Validate() error
type Deployment ¶
type Deployment struct { Integration string `json:"integration,omitempty" yaml:"integration,omitempty"` // should be @ Config DeploymentConfig `json:"config,omitempty" yaml:"config,omitempty"` }
func (Deployment) Validate ¶
func (d Deployment) Validate() (ExternalDependencies, error)
type DeploymentConfig ¶
type DeploymentConfig map[string]DeploymentConfigValue
type DeploymentConfigValue ¶
type Deployments ¶
type Deployments map[string]Deployment
func (Deployments) ExistDeployment ¶
func (d Deployments) ExistDeployment(deploymentName string) bool
type ExternalDependencies ¶
type ExternalDependencies struct { Repositories []string `json:"repositories,omitempty"` Variables []string `json:"variables,omitempty"` Secrets []string `json:"secrets,omitempty"` VCSServers []string `json:"vcs_servers,omitempty"` Actions []string `json:"actions,omitempty"` Integrations []string `json:"integrations,omitempty"` Deployments []string `json:"deployments,omitempty"` SSHKeys []string `json:"ssh_keys,omitempty"` PGPKeys []string `json:"pgp_keys,omitempty"` }
func (*ExternalDependencies) Add ¶
func (e *ExternalDependencies) Add(d ExternalDependencies)
type Hook ¶
type Job ¶
type Job struct { ID string `json:"-" yaml:"-"` Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Conditions *Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` Context []ContextRaw `json:"context,omitempty" yaml:"context,omitempty"` // can be @ Stage string `json:"stage,omitempty" yaml:"stage,omitempty"` Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty"` Requirements []exportentities.Requirement `json:"requirements,omitempty" yaml:"requirements,omitempty"` DependsOn []string `json:"depends_on,omitempty" yaml:"depends_on,omitempty"` }
type JobRun ¶
type JobRun struct { Status string `json:"status,omitempty" yaml:"status,omitempty"` SubNumber int64 `json:"sub_number,omitempty" yaml:"sub_number,omitempty"` StepStatus []StepStatus `json:"step_status,omitempty" yaml:"step_status,omitempty"` // Info from workflow v2 model WorkflowNodeRunID int64 `json:"workflow_node_run_id,omitempty" yaml:"workflow_node_run_id,omitempty"` WorkflowNodeJobRunID int64 `json:"workflow_node_job_run_id,omitempty" yaml:"workflow_node_job_run_id,omitempty"` }
type Jobs ¶
func (Jobs) FilterByStage ¶
type Notification ¶
type Notification struct { Type NotificationType `json:"type,omitempty" yaml:"type,omitempty"` Jobs []string `json:"jobs,omitempty" yaml:"jobs,omitempty"` }
func (Notification) Validate ¶
func (n Notification) Validate(w Workflow) error
type NotificationType ¶
type NotificationType string
const (
NotificationTypeEmails NotificationType = "emails"
)
func (NotificationType) Validate ¶
func (n NotificationType) Validate() error
type Repositories ¶
type Repositories map[string]Repository
func (Repositories) ExistRepo ¶
func (r Repositories) ExistRepo(repoName string) bool
type Repository ¶
type Repository struct { Slug string `json:"slug,omitempty" yaml:"slug,omitempty"` Server string `json:"server,omitempty" yaml:"server,omitempty"` // should be @ Connection string `json:"connection,omitempty" yaml:"connection,omitempty"` SSHKey string `json:"ssh_key,omitempty" yaml:"ssh_key,omitempty"` // can be @ PGPKey string `json:"pgp_key,omitempty" yaml:"pgp_key,omitempty"` // can be @ }
func (Repository) Validate ¶
func (r Repository) Validate(w Workflow) (ExternalDependencies, error)
type Requirement ¶
type Requirement struct { Binary string `json:"binary,omitempty" yaml:"binary,omitempty"` Model string `json:"model,omitempty" yaml:"model,omitempty"` Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` Plugin string `json:"plugin,omitempty" yaml:"plugin,omitempty"` Service ServiceRequirement `json:"service,omitempty" yaml:"service,omitempty"` Memory string `json:"memory,omitempty" yaml:"memory,omitempty"` OSArchRequirement string `json:"os-architecture,omitempty" yaml:"os-architecture,omitempty"` RegionRequirement string `json:"region,omitempty" yaml:"region,omitempty"` }
type Secrets ¶
func (Secrets) ExistSecret ¶
type ServiceRequirement ¶
type Stage ¶
type Stages ¶
func (Stages) ExistStage ¶
type Step ¶
type Step struct { exportentities.StepCustom `json:"-" yaml:",inline"` Script *StepScript `json:"script,omitempty" yaml:"script,omitempty"` PushBuildInfo *exportentities.StepPushBuildInfo `json:"pushBuildInfo,omitempty" yaml:"pushBuildInfo,omitempty"` Coverage *exportentities.StepCoverage `json:"coverage,omitempty" yaml:"coverage,omitempty"` ArtifactDownload *exportentities.StepArtifactDownload `json:"artifactDownload,omitempty" yaml:"artifactDownload,omitempty"` ArtifactUpload *exportentities.StepArtifactUpload `json:"artifactUpload,omitempty" yaml:"artifactUpload,omitempty"` GitClone *exportentities.StepGitClone `json:"gitClone,omitempty" yaml:"gitClone,omitempty"` GitTag *exportentities.StepGitTag `json:"gitTag,omitempty" yaml:"gitTag,omitempty"` ReleaseVCS *exportentities.StepReleaseVCS `json:"releaseVCS,omitempty" yaml:"releaseVCS,omitempty"` Release *exportentities.StepRelease `json:"release,omitempty" yaml:"release,omitempty"` JUnitReport *exportentities.StepJUnitReport `json:"jUnitReport,omitempty" yaml:"jUnitReport,omitempty"` Checkout *exportentities.StepCheckout `json:"checkout,omitempty" yaml:"checkout,omitempty"` InstallKey *exportentities.StepInstallKey `json:"installKey,omitempty" yaml:"installKey,omitempty"` Deploy *exportentities.StepDeploy `json:"deploy,omitempty" yaml:"deploy,omitempty"` Promote *exportentities.StepPromote `json:"promote,omitempty" yaml:"promote,omitempty"` AsCodeAction *exportentities.StepAscodeAction `json:"asCodeAction,omitempty" yaml:"asCodeAction,omitempty"` }
func (Step) MarshalJSON ¶
func (*Step) UnmarshalJSON ¶
type StepScript ¶
type StepScript interface{}
type StepStatus ¶
type ValidationResponse ¶
type ValidationResponse struct { Valid bool `json:"valid,omitempty"` Error string `json:"error,omitempty"` Workflow Workflow `json:"workflow,omitempty"` ExternalDependencies ExternalDependencies `json:"external_dependencies,omitempty"` }
type Workflow ¶
type Workflow struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Repositories Repositories `json:"repositories,omitempty" yaml:"repositories,omitempty"` Hooks map[string]Hook `json:"hooks,omitempty" yaml:"hooks,omitempty"` Deployments Deployments `json:"deployments,omitempty" yaml:"deployments,omitempty"` ArtifactManager ArtifactManager `json:"artifact_manager,omitempty" yaml:"artifact_manager,omitempty"` Notifications map[string]Notification `json:"notifications,omitempty" yaml:"notifications,omitempty"` Stages Stages `json:"stages,omitempty" yaml:"stages,omitempty"` Jobs Jobs `json:"jobs,omitempty" yaml:"jobs,omitempty"` Variables Variables `json:"variables,omitempty" yaml:"variables,omitempty"` Secrets Secrets `json:"secrets,omitempty" yaml:"secrets,omitempty"` Actions Actions `json:"actions,omitempty" yaml:"actions,omitempty"` Keys Keys `json:"keys,omitempty" yaml:"keys,omitempty"` }
func NewWorkflow ¶
func NewWorkflow() Workflow
func (Workflow) Validate ¶
func (w Workflow) Validate() (ExternalDependencies, error)
type WorkflowRun ¶
type WorkflowRun struct { Number int64 `json:"number,omitempty" yaml:"number,omitempty"` Infos sdk.WorkflowRunInfos `json:"infos,omitempty" yaml:"infos,omitempty"` Status string `json:"status,omitempty" yaml:"status,omitempty"` JobRuns map[string][]JobRun `json:"job_runs,omitempty" yaml:"job_runs,omitempty"` Resources WorkflowRunResources `json:"resources,omitempty" yaml:"resources,omitempty"` }
func ConvertRun ¶
func ConvertRun(wr *sdk.WorkflowRun, isFullExport bool) WorkflowRun
func NewWorkflowRun ¶
func NewWorkflowRun() WorkflowRun
type WorkflowRunResources ¶
type WorkflowRunResources struct { Workflow Workflow `json:"workflow,omitempty" yaml:"workflow,omitempty"` Integrations []sdk.ProjectIntegration `json:"integrations,omitempty" yaml:"integrations,omitempty"` }
Click to show internal directories.
Click to hide internal directories.