Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TemplatesPathEnvName is templates path environment name TemplatesPathEnvName = "TEMPLATES_PATH" // DefaultTemplatesPath is default path of stage templates DefaultTemplatesPath = "/root/templates" )
Variables ¶
This section is empty.
Functions ¶
func InitStageTemplates ¶
InitStageTemplates loads and creates stage templates for the given scene. scene - Workflow scene, for example, 'cicd', empty value indicates all scenes.
Types ¶
type StageTemplatesLoader ¶
type StageTemplatesLoader struct { // TemplatesDir is path of the folder holding templates manifest files. // If not set, default value DefaultTemplatesPath will be used. TemplatesDir string }
StageTemplatesLoader loads stage templates from manifest files.
func (*StageTemplatesLoader) LoadStageTemplates ¶
func (l *StageTemplatesLoader) LoadStageTemplates(scene string) ([]*v1alpha1.Stage, error)
LoadStageTemplates loads templates from the manifest files. scene - Scene of the Workflow, for example, cicd. If provided, only templates for that scene would be loaded, otherwise all templates will be loaded.
Click to show internal directories.
Click to hide internal directories.