apptask

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlatformWorkflowData

type PlatformWorkflowData struct {
	Conf             appconfig.Config
	CidContext       *context.CIDContext
	Environments     map[string]appcommon.VCSEnvironment
	ProjectVariables []api.CIVariable
}

type PlatformWorkflowTaskOptions

type PlatformWorkflowTaskOptions struct {
	LoadConfig func(taskContext taskcommon.TaskContext) (appconfig.Config, error) // LoadConfig defines a function that loads the configuration for the workflow task.

	// RenderWorkflow defines a function that renders the workflow file based on the provided parameters.
	RenderWorkflow func(
		workflowState *appconfig.WorkflowState,
		data PlatformWorkflowData,
		template string,
		targetPath string,
	) (string, error)

	WorkflowStatePath  string // Path where workflow state JSON will be stored.
	MergeRequestFooter string // MergeRequestFooter defines the footer of the merge request description, e.g. "This MR was auto-generated by CID."
}

type WorkflowTaskResult

type WorkflowTaskResult struct {
	WorkflowContent map[string]string        // WorkflowContent is a map with the rendered content of each generated file.
	WorkflowState   *appconfig.WorkflowState // WorkflowState is the state of the workflow after processing.
}

func WorkflowTask

func WorkflowTask(taskContext taskcommon.TaskContext, opts PlatformWorkflowTaskOptions, dryRun bool) (WorkflowTaskResult, error)

Jump to

Keyboard shortcuts

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