task

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAndGetPredefinedEnv added in v0.10.0

func BuildAndGetPredefinedEnv(play *ci.Play) (envVars []corev1.EnvVar)

BuildAndGetPredefinedEnv build the variables environment for all steps

func BuildCommonPredefinedEnv added in v0.10.0

func BuildCommonPredefinedEnv(play *ci.Play) (envVars []corev1.EnvVar)

BuildCommonPredefinedEnv return the basics commons environment variable

func BuildConfigPredefinedEnv added in v0.10.0

func BuildConfigPredefinedEnv() (envVars []corev1.EnvVar)

BuildConfigPredefinedEnv return then envVar from config values

func BuildTaskPredefinedEnv added in v0.10.0

func BuildTaskPredefinedEnv(tasks []map[ci.TaskType]ci.Task) (envVars []corev1.EnvVar)

BuildTaskPredefinedEnv build and return the environment variables from tasks

Types

type BuildTask

type BuildTask struct {
	Meta
	BuildDocker bool
}

BuildTask task struct fo CI

func (*BuildTask) Create

func (b *BuildTask) Create(ctx context.Context, r client.Client, log logr.Logger) error

type CleanTask

type CleanTask struct {
	Meta
}

CleanTask task struct for CI

func (*CleanTask) Create

func (u *CleanTask) Create(ctx context.Context, r client.Client, log logr.Logger) error

type DeployTask

type DeployTask struct {
	Meta
}

DeployTask task struct for CI

func (*DeployTask) Create

func (d *DeployTask) Create(ctx context.Context, r client.Client, log logr.Logger) error

type E2ETestTask added in v0.2.0

type E2ETestTask struct {
	Meta
}

E2ETestTask task struct for CI

func (*E2ETestTask) Create added in v0.2.0

func (e *E2ETestTask) Create(ctx context.Context, r client.Client, log logr.Logger) error

type GenericTask added in v0.10.0

type GenericTask struct {
	Meta
	TaskType ci.TaskType
	Params   []ci.ParamSpec
}

GenericTask task struct for CI

func (*GenericTask) Create added in v0.10.0

func (g *GenericTask) Create(ctx context.Context, r client.Client, logger logr.Logger) error

type IntTestTask

type IntTestTask struct {
	Meta
}

IntTestTask task struct for CI

func (*IntTestTask) Create

func (u *IntTestTask) Create(ctx context.Context, r client.Client, log logr.Logger) error

type Meta

type Meta struct {
	Steps    []tkn.Step
	Sidecars []tkn.Sidecar
	Play     *ci.Play
	Scheme   *runtime.Scheme
}

Meta is the base struct for all struct with create method

type Step

type Step struct {
	Index    int
	PlaySpec ci.PlaySpec
	Client   client.Client
	TaskType ci.TaskType
}

Step structure for GetStep and FilteredStep

func (*Step) FilteredSteps

func (s *Step) FilteredSteps(logger logr.Logger, steps ci.Steps, isTest bool) ci.Steps

FilteredSteps return a ci.Steps filtered by annotation

func (*Step) GetGenericSteps added in v0.1.1

func (s *Step) GetGenericSteps(logger logr.Logger, steps ci.Steps) ci.Steps

GetGenericSteps returns the steps bind with the task type

func (*Step) GetParams added in v0.10.0

func (s *Step) GetParams(params []ci.ParamSpec) (r []tkn.ParamSpec)

GetParams return the params from Step

func (*Step) GetSteps

func (s *Step) GetSteps(ctx context.Context, logger logr.Logger) (steps []tkn.Step, params []ci.ParamSpec, sidecars []tkn.Sidecar, err error)

GetSteps return the list of step according the task

type Task

type Task struct {
	// Index is the position of the task in the list
	Index   int
	Creates []func(context.Context, client.Client, logr.Logger) error
	Client  client.Client
	Play    *ci.Play
	Scheme  *runtime.Scheme
	Params  map[string][]ci.ParamSpec
}

func (*Task) Add

func (t *Task) Add(taskFunc func(context.Context, client.Client, logr.Logger) error) error

func (*Task) Build

func (t *Task) Build(ctx context.Context, logger logr.Logger) error

Build create the build Tekton Task resource

func (*Task) Clean

func (t *Task) Clean(ctx context.Context, logger logr.Logger) error

Clean create the clean Tekton Task resource

func (*Task) Deploy

func (t *Task) Deploy(ctx context.Context, logger logr.Logger) error

Deploy create the Deploy Tekton Task resource

func (*Task) E2ETest added in v0.2.0

func (t *Task) E2ETest(ctx context.Context, logger logr.Logger) error

E2ETest create an e2e test tekton Task resource

func (*Task) Generic added in v0.10.0

func (t *Task) Generic(ctx context.Context, taskType ci.TaskType, logger logr.Logger) error

Generic create a tekton Task resource

func (*Task) IntTest

func (t *Task) IntTest(ctx context.Context, logger logr.Logger) error

IntTest create the intTest Tekton Task resource

func (*Task) Parse

func (t *Task) Parse(ctx context.Context, logger logr.Logger) error

func (*Task) UnitTest

func (t *Task) UnitTest(ctx context.Context, logger logr.Logger) error

UnitTest create the unitTest Tekton Task resource

type UnitTestTask

type UnitTestTask struct {
	Meta
}

UnitTestTask task struct for CI

func (*UnitTestTask) Create

func (u *UnitTestTask) Create(ctx context.Context, r client.Client, log logr.Logger) error

Jump to

Keyboard shortcuts

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