Documentation ¶
Index ¶
- Constants
- func GetStepIDStepDataPair(stepListItem StepListItemModel) (string, stepmanModels.StepModel, error)
- func MergeEnvironmentWith(env *envmanModels.EnvironmentItemModel, ...) error
- func MergeStepWith(step, otherStep stepmanModels.StepModel) (stepmanModels.StepModel, error)
- type AppModel
- type BitriseDataModel
- type BuildRunResultsModel
- func (buildRes BuildRunResultsModel) ExitCode() int
- func (buildRes BuildRunResultsModel) HasFailedSkippableSteps() bool
- func (buildRes BuildRunResultsModel) IsBuildFailed() bool
- func (buildRes BuildRunResultsModel) IsStepLibUpdated(stepLib string) bool
- func (buildRes BuildRunResultsModel) OrderedResults() []StepRunResultsModel
- func (buildRes BuildRunResultsModel) ResultsCount() int
- type BuildRunStartModel
- type Container
- type DockerCredentials
- type PipelineModel
- type PullRequestReadyState
- type StageListItemModel
- type StageModel
- type StageWorkflowListItemModel
- type StageWorkflowModel
- type StepError
- type StepExecutionPlan
- type StepListItemModel
- type StepRunResultsModel
- type StepRunStatus
- type TestResultStepInfo
- type TriggerEventType
- type TriggerItemType
- type TriggerMapItemModel
- func (item TriggerMapItemModel) IsDraftPullRequestEnabled() bool
- func (item TriggerMapItemModel) MatchWithParams(pushBranch, prSourceBranch, prTargetBranch string, ...) (bool, error)
- func (item TriggerMapItemModel) Normalized(idx int) (TriggerMapItemModel, error)
- func (item TriggerMapItemModel) Validate(idx int, workflows, pipelines []string) ([]string, error)
- type TriggerMapModel
- func (triggerMap TriggerMapModel) FirstMatchingTarget(pushBranch, prSourceBranch, prTargetBranch string, ...) (string, string, error)
- func (triggerMap TriggerMapModel) Normalized() ([]TriggerMapItemModel, error)
- func (triggerMap TriggerMapModel) Validate(workflows, pipelines []string) ([]string, error)
- type WorkflowExecutionPlan
- type WorkflowListItemModel
- type WorkflowModel
- type WorkflowRunModes
- type WorkflowRunPlan
Constants ¶
const (
// FormatVersion ...
FormatVersion = "14"
)
Variables ¶
This section is empty.
Functions ¶
func GetStepIDStepDataPair ¶
func GetStepIDStepDataPair(stepListItem StepListItemModel) (string, stepmanModels.StepModel, error)
GetStepIDStepDataPair ...
func MergeEnvironmentWith ¶
func MergeEnvironmentWith(env *envmanModels.EnvironmentItemModel, otherEnv envmanModels.EnvironmentItemModel) error
MergeEnvironmentWith ...
func MergeStepWith ¶
func MergeStepWith(step, otherStep stepmanModels.StepModel) (stepmanModels.StepModel, error)
MergeStepWith ...
Types ¶
type AppModel ¶
type AppModel struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Environments []envmanModels.EnvironmentItemModel `json:"envs,omitempty" yaml:"envs,omitempty"` }
AppModel ...
func (*AppModel) FillMissingDefaults ¶
FillMissingDefaults ...
type BitriseDataModel ¶
type BitriseDataModel struct { FormatVersion string `json:"format_version" yaml:"format_version"` DefaultStepLibSource string `json:"default_step_lib_source,omitempty" yaml:"default_step_lib_source,omitempty"` ProjectType string `json:"project_type" yaml:"project_type"` // Title string `json:"title,omitempty" yaml:"title,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` // App AppModel `json:"app,omitempty" yaml:"app,omitempty"` Meta map[string]interface{} `json:"meta,omitempty" yaml:"meta,omitempty"` TriggerMap TriggerMapModel `json:"trigger_map,omitempty" yaml:"trigger_map,omitempty"` Pipelines map[string]PipelineModel `json:"pipelines,omitempty" yaml:"pipelines,omitempty"` Stages map[string]StageModel `json:"stages,omitempty" yaml:"stages,omitempty"` Workflows map[string]WorkflowModel `json:"workflows,omitempty" yaml:"workflows,omitempty"` }
BitriseDataModel ...
func (*BitriseDataModel) FillMissingDefaults ¶
func (config *BitriseDataModel) FillMissingDefaults() error
FillMissingDefaults ...
func (*BitriseDataModel) Normalize ¶
func (config *BitriseDataModel) Normalize() error
Normalize ...
func (*BitriseDataModel) RemoveRedundantFields ¶
func (config *BitriseDataModel) RemoveRedundantFields() error
RemoveRedundantFields ...
func (*BitriseDataModel) Validate ¶
func (config *BitriseDataModel) Validate() ([]string, error)
Validate ...
type BuildRunResultsModel ¶
type BuildRunResultsModel struct { WorkflowID string `json:"workflow_id" yaml:"workflow_id"` EventName string `json:"event_name" yaml:"event_name"` ProjectType string `json:"project_type" yaml:"project_type"` StartTime time.Time `json:"start_time" yaml:"start_time"` StepmanUpdates map[string]int `json:"stepman_updates" yaml:"stepman_updates"` SuccessSteps []StepRunResultsModel `json:"success_steps" yaml:"success_steps"` FailedSteps []StepRunResultsModel `json:"failed_steps" yaml:"failed_steps"` FailedSkippableSteps []StepRunResultsModel `json:"failed_skippable_steps" yaml:"failed_skippable_steps"` SkippedSteps []StepRunResultsModel `json:"skipped_steps" yaml:"skipped_steps"` }
BuildRunResultsModel ...
func (BuildRunResultsModel) ExitCode ¶
func (buildRes BuildRunResultsModel) ExitCode() int
func (BuildRunResultsModel) HasFailedSkippableSteps ¶
func (buildRes BuildRunResultsModel) HasFailedSkippableSteps() bool
func (BuildRunResultsModel) IsBuildFailed ¶
func (buildRes BuildRunResultsModel) IsBuildFailed() bool
func (BuildRunResultsModel) IsStepLibUpdated ¶
func (buildRes BuildRunResultsModel) IsStepLibUpdated(stepLib string) bool
func (BuildRunResultsModel) OrderedResults ¶
func (buildRes BuildRunResultsModel) OrderedResults() []StepRunResultsModel
func (BuildRunResultsModel) ResultsCount ¶
func (buildRes BuildRunResultsModel) ResultsCount() int
type BuildRunStartModel ¶
type BuildRunStartModel struct { EventName string `json:"event_name" yaml:"event_name"` ProjectType string `json:"project_type" yaml:"project_type"` StartTime time.Time `json:"start_time" yaml:"start_time"` }
BuildRunStartModel ...
type Container ¶
type Container struct { Image string `json:"image,omitempty" yaml:"image,omitempty"` Credentials DockerCredentials `json:"credentials,omitempty" yaml:"credentials,omitempty"` Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` Envs []envmanModels.EnvironmentItemModel `json:"envs,omitempty" yaml:"envs,omitempty"` Options string `json:"options,omitempty" yaml:"options,omitempty"` }
type DockerCredentials ¶
type PipelineModel ¶
type PipelineModel struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` Stages []StageListItemModel `json:"stages,omitempty" yaml:"stages,omitempty"` }
PipelineModel ...
type PullRequestReadyState ¶
type PullRequestReadyState string
const ( PullRequestReadyStateDraft PullRequestReadyState = "draft" PullRequestReadyStateReadyForReview PullRequestReadyState = "ready_for_review" PullRequestReadyStateConvertedToReadyForReview PullRequestReadyState = "converted_to_ready_for_review" )
type StageModel ¶
type StageModel struct { Title string `json:"title,omitempty" yaml:"title,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` ShouldAlwaysRun bool `json:"should_always_run,omitempty" yaml:"should_always_run,omitempty"` AbortOnFail bool `json:"abort_on_fail,omitempty" yaml:"abort_on_fail,omitempty"` RunIf string `json:"run_if,omitempty" yaml:"run_if,omitempty"` Workflows []StageWorkflowListItemModel `json:"workflows,omitempty" yaml:"workflows,omitempty"` }
StageModel ...
type StageWorkflowListItemModel ¶
type StageWorkflowListItemModel map[string]StageWorkflowModel
StageWorkflowListItemModel ...
type StageWorkflowModel ¶
type StageWorkflowModel struct {
RunIf string `json:"run_if,omitempty" yaml:"run_if,omitempty"`
}
StageWorkflowModel ...
type StepExecutionPlan ¶
type StepListItemModel ¶
type StepListItemModel map[string]stepmanModels.StepModel
StepListItemModel ...
func (StepListItemModel) GetStepIDAndStep ¶
func (stepListItem StepListItemModel) GetStepIDAndStep() (string, stepmanModels.StepModel)
GetStepIDAndStep returns the Step ID and Step model described by the stepListItem. Use this on validated BitriseDataModels.
type StepRunResultsModel ¶
type StepRunResultsModel struct { StepInfo stepmanModels.StepInfoModel `json:"step_info" yaml:"step_info"` StepInputs map[string]string `json:"step_inputs" yaml:"step_inputs"` Status StepRunStatus `json:"status" yaml:"status"` Idx int `json:"idx" yaml:"idx"` RunTime time.Duration `json:"run_time" yaml:"run_time"` StartTime time.Time `json:"start_time" yaml:"start_time"` ErrorStr string `json:"error_str" yaml:"error_str"` ExitCode int `json:"exit_code" yaml:"exit_code"` Timeout time.Duration `json:"-"` NoOutputTimeout time.Duration `json:"-"` }
StepRunResultsModel ...
func (StepRunResultsModel) StatusReasonAndErrors ¶
func (s StepRunResultsModel) StatusReasonAndErrors() (string, []StepError)
type StepRunStatus ¶
type StepRunStatus int
StepRunStatus ...
const ( StepRunStatusCodeSuccess StepRunStatus = 0 StepRunStatusCodeFailed StepRunStatus = 1 StepRunStatusCodeFailedSkippable StepRunStatus = 2 StepRunStatusCodeSkipped StepRunStatus = 3 StepRunStatusCodeSkippedWithRunIf StepRunStatus = 4 StepRunStatusCodePreparationFailed StepRunStatus = 5 StepRunStatusAbortedWithCustomTimeout StepRunStatus = 7 // step times out due to a custom timeout StepRunStatusAbortedWithNoOutputTimeout StepRunStatus = 8 // step times out due to no output received (hang) )
func NewStepRunStatus ¶
func NewStepRunStatus(status string) StepRunStatus
func (StepRunStatus) Name ¶
func (s StepRunStatus) Name() string
func (StepRunStatus) String ¶
func (s StepRunStatus) String() string
type TestResultStepInfo ¶
type TestResultStepInfo struct { ID string `json:"id" yaml:"id"` Version string `json:"version" yaml:"version"` Title string `json:"title" yaml:"title"` Number int `json:"number" yaml:"number"` }
TestResultStepInfo ...
type TriggerEventType ¶
type TriggerEventType string
const ( TriggerEventTypeCodePush TriggerEventType = "code-push" TriggerEventTypePullRequest TriggerEventType = "pull-request" TriggerEventTypeTag TriggerEventType = "tag" TriggerEventTypeUnknown TriggerEventType = "unknown" )
type TriggerItemType ¶
type TriggerItemType string
const ( CodePushType TriggerItemType = "push" PullRequestType TriggerItemType = "pull_request" TagPushType TriggerItemType = "tag" )
type TriggerMapItemModel ¶
type TriggerMapItemModel struct { // Trigger Item shared properties Type TriggerItemType `json:"type,omitempty" yaml:"type,omitempty"` Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` PipelineID string `json:"pipeline,omitempty" yaml:"pipeline,omitempty"` WorkflowID string `json:"workflow,omitempty" yaml:"workflow,omitempty"` // Code Push Item conditions PushBranch interface{} `json:"push_branch,omitempty" yaml:"push_branch,omitempty"` // Code Push and Pull Request Item conditions CommitMessage interface{} `json:"commit_message,omitempty" yaml:"commit_message,omitempty"` ChangedFiles interface{} `json:"changed_files,omitempty" yaml:"changed_files,omitempty"` // Tag Push Item conditions Tag interface{} `json:"tag,omitempty" yaml:"tag,omitempty"` // Pull Request Item conditions PullRequestSourceBranch interface{} `json:"pull_request_source_branch,omitempty" yaml:"pull_request_source_branch,omitempty"` PullRequestTargetBranch interface{} `json:"pull_request_target_branch,omitempty" yaml:"pull_request_target_branch,omitempty"` DraftPullRequestEnabled *bool `json:"draft_pull_request_enabled,omitempty" yaml:"draft_pull_request_enabled,omitempty"` PullRequestLabel interface{} `json:"pull_request_label,omitempty" yaml:"pull_request_label,omitempty"` PullRequestComment interface{} `json:"pull_request_comment,omitempty" yaml:"pull_request_comment,omitempty"` // Deprecated properties Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"` IsPullRequestAllowed bool `json:"is_pull_request_allowed,omitempty" yaml:"is_pull_request_allowed,omitempty"` }
func (TriggerMapItemModel) IsDraftPullRequestEnabled ¶
func (item TriggerMapItemModel) IsDraftPullRequestEnabled() bool
func (TriggerMapItemModel) MatchWithParams ¶
func (item TriggerMapItemModel) MatchWithParams(pushBranch, prSourceBranch, prTargetBranch string, prReadyState PullRequestReadyState, tag string) (bool, error)
func (TriggerMapItemModel) Normalized ¶
func (item TriggerMapItemModel) Normalized(idx int) (TriggerMapItemModel, error)
Normalized casts trigger item values from map[interface{}]interface{} to map[string]interface{} to support JSON marshalling of the bitrise.yml.
type TriggerMapModel ¶
type TriggerMapModel []TriggerMapItemModel
func (TriggerMapModel) FirstMatchingTarget ¶
func (triggerMap TriggerMapModel) FirstMatchingTarget(pushBranch, prSourceBranch, prTargetBranch string, prReadyState PullRequestReadyState, tag string) (string, string, error)
func (TriggerMapModel) Normalized ¶
func (triggerMap TriggerMapModel) Normalized() ([]TriggerMapItemModel, error)
type WorkflowExecutionPlan ¶
type WorkflowExecutionPlan struct { UUID string `json:"uuid"` WorkflowID string `json:"workflow_id"` Steps []StepExecutionPlan `json:"steps"` IsSteplibOfflineMode bool `json:"-"` }
type WorkflowListItemModel ¶
type WorkflowListItemModel map[string]WorkflowModel
WorkflowListItemModel ...
type WorkflowModel ¶
type WorkflowModel struct { Container Container `json:"container,omitempty" yaml:"container,omitempty"` Services map[string]Container `json:"services,omitempty" yaml:"services,omitempty"` Title string `json:"title,omitempty" yaml:"title,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` BeforeRun []string `json:"before_run,omitempty" yaml:"before_run,omitempty"` AfterRun []string `json:"after_run,omitempty" yaml:"after_run,omitempty"` Environments []envmanModels.EnvironmentItemModel `json:"envs,omitempty" yaml:"envs,omitempty"` Steps []StepListItemModel `json:"steps,omitempty" yaml:"steps,omitempty"` Meta map[string]interface{} `json:"meta,omitempty" yaml:"meta,omitempty"` }
WorkflowModel ...
func (*WorkflowModel) FillMissingDefaults ¶
func (workflow *WorkflowModel) FillMissingDefaults(title string) error
FillMissingDefaults ...
func (*WorkflowModel) Validate ¶
func (workflow *WorkflowModel) Validate() ([]string, error)
Validate ...
type WorkflowRunModes ¶
type WorkflowRunPlan ¶
type WorkflowRunPlan struct { Version string `json:"version"` LogFormatVersion string `json:"log_format_version"` CIMode bool `json:"ci_mode"` PRMode bool `json:"pr_mode"` DebugMode bool `json:"debug_mode"` IsSteplibOfflineMode bool `json:"-"` NoOutputTimeoutMode bool `json:"no_output_timeout_mode"` SecretFilteringMode bool `json:"secret_filtering_mode"` SecretEnvsFilteringMode bool `json:"secret_envs_filtering_mode"` ExecutionPlan []WorkflowExecutionPlan `json:"execution_plan"` }