cli

package
v0.0.0-...-50c3bce Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 49 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JSONParamsKey       = "json-params"
	JSONParamsBase64Key = "json-params-base64"

	WorkflowKey = "workflow"

	PatternKey        = "pattern"
	PushBranchKey     = "push-branch"
	PRSourceBranchKey = "pr-source-branch"
	PRTargetBranchKey = "pr-target-branch"

	IncludeWorkflowMetaKey = "include-workflow-meta"
	ConfigKey              = "config"
	InventoryKey           = "inventory"
	OuputFormatKey         = "format"
)

Flags ...

View Source
const (
	// CollectionPathEnvKey ...
	CollectionPathEnvKey = "STEPMAN_COLLECTION"
	// CIKey ...
	CIKey = "ci"
	// PRKey ...
	PRKey = "pr"
	// DebugModeKey ...
	DebugModeKey = "debug"

	// VersionKey ...
	VersionKey = "version"

	// PathKey ...
	PathKey = "path"

	// CollectionKey ...
	CollectionKey = "collection"

	// InventoryBase64Key ...
	InventoryBase64Key = "inventory-base64"

	// ConfigBase64Key ...
	ConfigBase64Key = "config-base64"

	// HelpKey ...
	HelpKey = "help"

	// MinimalModeKey ...
	MinimalModeKey = "minimal"
	// FullModeKey ...
	FullModeKey = "full"

	// OuputPathKey ...
	OuputPathKey = "outpath"
	// PrettyFormatKey ...
	PrettyFormatKey = "pretty"

	// IDKey ...
	IDKey = "id"

	// ShortKey ...
	ShortKey = "short"

	// StepYMLKey ...
	StepYMLKey = "step-yml"

	// TagKey ...
	TagKey = "tag"
	// GitKey ...
	GitKey = "git"
	// StepIDKey ...
	StepIDKey = "stepid"
)
View Source
const (
	// DefaultBitriseConfigFileName ...
	DefaultBitriseConfigFileName = "bitrise.yml"
	// DefaultSecretsFileName ...
	DefaultSecretsFileName = ".bitrise.secrets.yml"
	OutputFormatKey        = "output-format"
)

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string, remove bool) error

CopyFile ...

func CreateBitriseConfigFromCLIParams

func CreateBitriseConfigFromCLIParams(bitriseConfigBase64Data, bitriseConfigPath string) (models.BitriseDataModel, []string, error)

CreateBitriseConfigFromCLIParams ...

func CreateInventoryFromCLIParams

func CreateInventoryFromCLIParams(inventoryBase64Data, inventoryPath string) ([]envmanModels.EnvironmentItemModel, error)

CreateInventoryFromCLIParams ...

func GetBitriseConfigFilePath

func GetBitriseConfigFilePath(bitriseConfigPath string) (string, error)

GetBitriseConfigFilePath ...

func GetBitriseConfigFromBase64Data

func GetBitriseConfigFromBase64Data(configBase64Str string) (models.BitriseDataModel, []string, error)

GetBitriseConfigFromBase64Data ...

func GetInventoryFilePath

func GetInventoryFilePath(inventoryPath string) (string, error)

GetInventoryFilePath ...

func GetInventoryFromBase64Data

func GetInventoryFromBase64Data(inventoryBase64Str string) ([]envmanModels.EnvironmentItemModel, error)

GetInventoryFromBase64Data ...

func Run

func Run()

Run ...

Types

type Formatable

type Formatable interface {
	String() string
	JSON() string
}

Formatable ...

type JSONLogger

type JSONLogger struct {
	// contains filtered or unexported fields
}

JSONLogger ...

func NewDefaultJSONLogger

func NewDefaultJSONLogger() JSONLogger

NewDefaultJSONLogger ...

func (JSONLogger) Print

func (l JSONLogger) Print(f Formatable)

Print ...

type Logger

type Logger interface {
	Print(f Formatable)
}

Logger ...

type RawLogger

type RawLogger struct {
	// contains filtered or unexported fields
}

RawLogger ...

func NewDefaultRawLogger

func NewDefaultRawLogger() RawLogger

NewDefaultRawLogger ...

func (RawLogger) Print

func (l RawLogger) Print(f Formatable)

Print ...

type RunAndTriggerParamsModel

type RunAndTriggerParamsModel struct {
	// Run Params
	WorkflowToRunID string `json:"workflow"`

	// Trigger Params
	TriggerPattern string `json:"pattern"`

	PushBranch     string `json:"push-branch"`
	PRSourceBranch string `json:"pr-source-branch"`
	PRTargetBranch string `json:"pr-target-branch"`
	Tag            string `json:"tag"`

	// Trigger Check Params
	Format string `json:"format"`

	// Bitrise Config Params
	BitriseConfigPath       string `json:"config"`
	BitriseConfigBase64Data string `json:"config-base64"`

	InventoryPath       string `json:"inventory"`
	InventoryBase64Data string `json:"inventory-base64"`
}

RunAndTriggerParamsModel ...

type RunConfig

type RunConfig struct {
	Modes    models.WorkflowRunModes
	Config   models.BitriseDataModel
	Workflow string
	Secrets  []envmanModels.EnvironmentItemModel
}

type ValidateResponseModel

type ValidateResponseModel struct {
	Data     *ValidationModel `json:"data,omitempty" yaml:"data,omitempty"`
	Error    string           `json:"error,omitempty" yaml:"error,omitempty"`
	Warnings []string         `json:"warnings,omitempty" yaml:"warnings,omitempty"`
}

ValidateResponseModel ...

func NewValidationError

func NewValidationError(err string, warnings ...string) ValidateResponseModel

NewValidationError ...

func NewValidationResponse

func NewValidationResponse(validation ValidationModel, warnings ...string) ValidateResponseModel

NewValidationResponse ...

func (ValidateResponseModel) JSON

func (v ValidateResponseModel) JSON() string

JSON ...

func (ValidateResponseModel) String

func (v ValidateResponseModel) String() string

type ValidationItemModel

type ValidationItemModel struct {
	IsValid  bool     `json:"is_valid" yaml:"is_valid"`
	Error    string   `json:"error,omitempty" yaml:"error,omitempty"`
	Warnings []string `json:"warnings,omitempty" yaml:"warnings,omitempty"`
}

ValidationItemModel ...

type ValidationModel

type ValidationModel struct {
	Config  *ValidationItemModel `json:"config,omitempty" yaml:"config,omitempty"`
	Secrets *ValidationItemModel `json:"secrets,omitempty" yaml:"secrets,omitempty"`
}

ValidationModel ...

func (ValidationModel) IsValid

func (v ValidationModel) IsValid() bool

IsValid ...

func (ValidationModel) String

func (v ValidationModel) String() string

String ...

type VersionOutputModel

type VersionOutputModel struct {
	Version       string `json:"version"`
	FormatVersion string `json:"format_version"`
	OS            string `json:"os"`
	GO            string `json:"go"`
	BuildNumber   string `json:"build_number"`
	Commit        string `json:"commit"`
}

VersionOutputModel ...

type WorkflowListOutputModel

type WorkflowListOutputModel struct {
	Data     map[string]map[string]string `json:"data,omitempty" yml:"data,omitempty"`
	Warnings []string                     `json:"warnings,omitempty" yml:"warnings,omitempty"`
	Error    string                       `json:"error,omitempty" yml:"error,omitempty"`
}

WorkflowListOutputModel ...

func NewErrorOutput

func NewErrorOutput(err string, warnings ...string) WorkflowListOutputModel

NewErrorOutput ...

func NewOutput

func NewOutput(data map[string]map[string]string, warnings ...string) WorkflowListOutputModel

NewOutput ...

func (WorkflowListOutputModel) JSON

func (output WorkflowListOutputModel) JSON() string

JSON ...

func (WorkflowListOutputModel) String

func (output WorkflowListOutputModel) String() string

String ...

type WorkflowRunner

type WorkflowRunner struct {
	// contains filtered or unexported fields
}

func NewWorkflowRunner

func NewWorkflowRunner(config RunConfig) WorkflowRunner

func (WorkflowRunner) RunWorkflowsWithSetupAndCheckForUpdate

func (r WorkflowRunner) RunWorkflowsWithSetupAndCheckForUpdate() (int, error)

Jump to

Keyboard shortcuts

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