tekton

package
v0.0.0-...-64e8fac Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Tekton  tektonclientset.Interface
	Kube    k8s.Interface
	Dynamic dynamic.Interface
}

func InitClient

func InitClient(kubeconfig string) (*Client, error)

type Interface

type Interface interface {
	GetPipelineRunByID(ctx context.Context, ciEventID string) (*v1beta1.PipelineRun, error)
	// CreatePipelineRun create pipelinerun
	CreatePipelineRun(ctx context.Context, pr *PipelineRun) (string, error)
	// StopPipelineRun stop pipelinerun
	StopPipelineRun(ctx context.Context, ciEventID string) error
	GetPipelineRunLogByID(ctx context.Context, ciEventID string) (<-chan log.Log, <-chan error, error)
	GetPipelineRunLog(ctx context.Context, pr *v1beta1.PipelineRun) (<-chan log.Log, <-chan error, error)
	DeletePipelineRun(ctx context.Context, pr *v1beta1.PipelineRun) error
}

type PipelineRun

type PipelineRun struct {
	Action           string                 `json:"action"`
	Application      string                 `json:"application"`
	ApplicationID    uint                   `json:"applicationID"`
	Cluster          string                 `json:"cluster"`
	ClusterID        uint                   `json:"clusterID"`
	Environment      string                 `json:"environment"`
	Git              PipelineRunGit         `json:"git"`
	ImageURL         string                 `json:"imageURL"`
	Operator         string                 `json:"operator"`
	PipelinerunID    uint                   `json:"pipelinerunID"`
	PipelineJSONBlob map[string]interface{} `json:"pipelineJSONBlob"`
	Region           string                 `json:"region"`
	RegionID         uint                   `json:"regionID"`
	Template         string                 `json:"template"`
	Token            string                 `json:"token"`
}

type PipelineRunGit

type PipelineRunGit struct {
	URL       string `json:"url"`
	Branch    string `json:"branch"`
	Tag       string `json:"tag"`
	Subfolder string `json:"subfolder"`
	Commit    string `json:"commit"`
}

type PipelineRunStatus

type PipelineRunStatus struct {
	Name        string
	RunningTask *RunningTask
	Status      string
}

func GetPipelineRunStatus

func GetPipelineRunStatus(ctx context.Context, pr *v1beta1.PipelineRun) *PipelineRunStatus

type RunningTask

type RunningTask struct {
	Name   string
	Status string
}

func GetPipelineRunningTask

func GetPipelineRunningTask(ctx context.Context, pr *v1beta1.PipelineRun) *RunningTask

type Tekton

type Tekton struct {
	// contains filtered or unexported fields
}

func NewTekton

func NewTekton(tektonConfig *tekton.Tekton) (*Tekton, error)

func (*Tekton) CreatePipelineRun

func (t *Tekton) CreatePipelineRun(ctx context.Context, pr *PipelineRun) (eventID string, err error)

func (*Tekton) DeletePipelineRun

func (t *Tekton) DeletePipelineRun(ctx context.Context, pr *v1beta1.PipelineRun) error

func (*Tekton) GetPipelineRunByID

func (t *Tekton) GetPipelineRunByID(ctx context.Context, ciEventID string) (_ *v1beta1.PipelineRun, err error)

func (*Tekton) GetPipelineRunLog

func (t *Tekton) GetPipelineRunLog(ctx context.Context, pr *v1beta1.PipelineRun) (<-chan log.Log, <-chan error, error)

func (*Tekton) GetPipelineRunLogByID

func (t *Tekton) GetPipelineRunLogByID(ctx context.Context, ciEventID string) (
	_ <-chan log.Log, _ <-chan error, err error)

func (*Tekton) StopPipelineRun

func (t *Tekton) StopPipelineRun(ctx context.Context, ciEventID string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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