option

package
v0.0.59 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChooseObjectFromArray

func ChooseObjectFromArray(object string, options []string) (result string, err error)

ChooseObjectFromArray chooses a object from array

func ChooseOneFromArray

func ChooseOneFromArray(options []string) (result string, err error)

ChooseOneFromArray choose an item from array

Types

type PipelineCreateOption

type PipelineCreateOption struct {
	Workspace   string
	Project     string
	Name        string
	Jenkinsfile string
	Template    string
	Type        string
	SCMType     string
	Batch       bool
	SkipCheck   bool

	// Inner fields
	Client       dynamic.Interface
	WorkspaceUID string
}

PipelineCreateOption is the option for creating a pipeline

func (*PipelineCreateOption) CheckDevOpsProject

func (o *PipelineCreateOption) CheckDevOpsProject(wsID string) (project *unstructured.Unstructured, err error)

CheckDevOpsProject makes sure the project exist

func (*PipelineCreateOption) CheckWorkspace

func (o *PipelineCreateOption) CheckWorkspace() (ws *unstructured.Unstructured, err error)

CheckWorkspace makes sure the target workspace exist

func (*PipelineCreateOption) CreatePipeline

func (o *PipelineCreateOption) CreatePipeline() (err error)

CreatePipeline creates pipeline

func (*PipelineCreateOption) GetDevOpsNamespaceList

func (o *PipelineCreateOption) GetDevOpsNamespaceList() (names []string, err error)

GetDevOpsNamespaceList returns a DevOps namespace list

func (*PipelineCreateOption) GetUnstructuredListInNamespace

func (o *PipelineCreateOption) GetUnstructuredListInNamespace(namespace string, schemaType schema.GroupVersionResource) (
	wsList *unstructured.UnstructuredList, err error)

GetUnstructuredListInNamespace returns the list

func (*PipelineCreateOption) GetUnstructuredNameListInNamespace

func (o *PipelineCreateOption) GetUnstructuredNameListInNamespace(namespace string, originalName bool, excludes []string, schemaType schema.GroupVersionResource) (names []string, err error)

GetUnstructuredNameListInNamespace returns a list

func (*PipelineCreateOption) GetWorkspaceTemplateNameList

func (o *PipelineCreateOption) GetWorkspaceTemplateNameList() (names []string, err error)

GetWorkspaceTemplateNameList returns a template name list

func (*PipelineCreateOption) ParseTemplate

func (o *PipelineCreateOption) ParseTemplate() (err error)

ParseTemplate parses a template

func (*PipelineCreateOption) Wizard

func (o *PipelineCreateOption) Wizard(_ *cobra.Command, _ []string) (err error)

Wizard is the wizard for creating a pipeline

Jump to

Keyboard shortcuts

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