validate

package
v2.5.0-rc7+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LintCronWorkflowDir

func LintCronWorkflowDir(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, namespace, dirPath string, strict bool) error

LintCronWorkflowDir validates all cron workflow manifests in a directory. Ignores non-workflow template manifests

func LintCronWorkflowFile

func LintCronWorkflowFile(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, namespace, filePath string, strict bool) error

LintCronWorkflowFile lints a json file, or multiple cron workflow manifest in a single yaml file. Ignores non-cron workflow manifests

func LintWorkflowDir

func LintWorkflowDir(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, dirPath string, strict bool) error

LintWorkflowDir validates all workflow manifests in a directory. Ignores non-workflow manifests

func LintWorkflowFile

func LintWorkflowFile(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, filePath string, strict bool) error

LintWorkflowFile lints a json file, or multiple workflow manifest in a single yaml file. Ignores non-workflow manifests

func LintWorkflowTemplateDir

func LintWorkflowTemplateDir(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, dirPath string, strict bool) error

LintWorkflowTemplateDir validates all workflow manifests in a directory. Ignores non-workflow template manifests

func LintWorkflowTemplateFile

func LintWorkflowTemplateFile(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, filePath string, strict bool) error

LintWorkflowTemplateFile lints a json file, or multiple workflow template manifest in a single yaml file. Ignores non-workflow template manifests

func ParseWfFromFile

func ParseWfFromFile(filePath string, strict bool) ([]wfv1.Workflow, error)

func ParseWfTmplFromFile

func ParseWfTmplFromFile(filePath string, strict bool) ([]wfv1.WorkflowTemplate, error)

func ValidateCronWorkflow

func ValidateCronWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, cronWf *wfv1.CronWorkflow) error

ValidateCronWorkflow validates a CronWorkflow

func ValidateWorkflow

func ValidateWorkflow(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, wf *wfv1.Workflow, opts ValidateOpts) error

ValidateWorkflow accepts a workflow and performs validation against it.

func ValidateWorkflowTemplate

func ValidateWorkflowTemplate(wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, wftmpl *wfv1.WorkflowTemplate) error

ValidateWorkflow accepts a workflow template and performs validation against it.

Types

type FakeArguments

type FakeArguments struct{}

func (*FakeArguments) GetArtifactByName

func (args *FakeArguments) GetArtifactByName(name string) *wfv1.Artifact

func (*FakeArguments) GetParameterByName

func (args *FakeArguments) GetParameterByName(name string) *wfv1.Parameter

type ValidateOpts

type ValidateOpts struct {
	// Lint indicates if this is performing validation in the context of linting. If true, will
	// skip some validations which is permissible during linting but not submission (e.g. missing
	// input parameters to the workflow)
	Lint bool
	// ContainerRuntimeExecutor will trigger additional validation checks specific to different
	// types of executors. For example, the inability of kubelet/k8s executors to copy artifacts
	// out of the base image layer. If unspecified, will use docker executor validation
	ContainerRuntimeExecutor string
}

ValidateOpts provides options when linting

Jump to

Keyboard shortcuts

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