option

package
v0.0.71 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PipelinerunOwnerLabelKey   = "devops.kubesphere.io/pipeline"
	PipelinerunIdAnnotationKey = "devops.kubesphere.io/jenkins-pipelinerun-id"

	PipelinerunPhaseRunning   = "Running"
	PipelinerunPhaseSucceeded = "Succeeded"
	PipelinerunPhaseCancelled = "Cancelled"
	PipelinerunPhaseFailed    = "Failed"

	NoScmPipelineType       = "pipeline"
	MultiBranchPipelineType = "multi-branch-pipeline"
)

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