endpoints

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const CRDNameLengthLimit = 53
View Source
const ContainerPrefix = "build-step-"

Unexported field within tekton "github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/taskrun/resources"

Variables

View Source
var LogChannel = make(chan broadcaster.SocketData)

Define all broadcasters/channels Keep broadcaster channels open indefinitely

View Source
var ResourcesChannel = make(chan broadcaster.SocketData)

Functions

func GetDashboardVersion added in v0.5.1

func GetDashboardVersion(r Resource, installedNamespace string) string

Get dashboard version

func GetPipelineVersion added in v0.5.1

func GetPipelineVersion(r Resource, pipelineNamespace string, isOpenShift bool) string

Get pipelines version

func GetTriggersVersion added in v0.6.0

func GetTriggersVersion(r Resource, triggersNamespace string, isOpenShift bool) string

Get triggers version

func IsOpenShift added in v0.5.3

func IsOpenShift(r Resource, installedNamespace string) bool

IsOpenShift determines whether the Dashboard is running on OpenShift or not

func IsReadOnly added in v0.5.3

func IsReadOnly() bool

IsReadOnly determines whether the Dashboard is running in read-only mode or not

func IsTriggersInstalled added in v0.6.0

func IsTriggersInstalled(r Resource, triggersNamespace string, isOpenShift bool) bool

Check whether Tekton Triggers is installed

func SearchForDeployment added in v0.6.0

func SearchForDeployment(r Resource, thingSearchingFor string, namespace string) bool

Go through Triggers deployments and find if it is installed

Types

type AppResponse

type AppResponse struct {
	ERROR   error
	MESSAGE string
	CODE    int
}

AppResponse represents an error with a code, message, and the error itself

type BuildInformation

type BuildInformation struct {
	REPOURL   string
	SHORTID   string
	COMMITID  string
	REPONAME  string
	TIMESTAMP string
}

BuildInformation - information required to build a particular commit from a Git repository.

type BuildRequest

type BuildRequest struct {
	/* Example payload
	{
		"repourl": "https://github.ibm.com/your-org/test-project",
		"commitid": "7d84981c66718ee2dda1af280f915cc2feb6ffow",
		"reponame": "test-project"
	}
	*/
	REPOURL  string `json:"repourl"`
	COMMITID string `json:"commitid"`
	REPONAME string `json:"reponame"`
	BRANCH   string `json:"branch"`
}

BuildRequest - a manual submission data struct

type LogContainer

type LogContainer struct {
	Name string
	Logs []string
}

LogContainer - represents the logs for a given container

type PipelineRunLog

type PipelineRunLog []TaskRunLog

type PipelineRunUpdateBody

type PipelineRunUpdateBody struct {
	STATUS string `json:"status"`
}

PipelineRunUpdateBody - represents a request that a user may provide for updating a PipelineRun Currently only modifying the status is supported but this gives us scope for adding additional fields

type Properties

type Properties struct {
	InstallNamespace string `json:"InstallNamespace"`
	DashboardVersion string `json:"DashboardVersion"`
	PipelineVersion  string `json:"PipelineVersion"`
	TriggersVersion  string `json:"TriggersVersion,omitempty"`
	IsOpenShift      bool   `json:"IsOpenShift"`
	ReadOnly         bool   `json:"ReadOnly"`
}

Properties : properties we want to be able to retrieve via REST

type RerunRequest added in v0.3.0

type RerunRequest struct {
	PIPELINERUNNAME string `json:"pipelinerunname"`
}

type Resource

type Resource struct {
	PipelineClient         versioned.Interface
	PipelineResourceClient resourceversioned.Interface
	K8sClient              k8sclientset.Interface
	RouteClient            routeclient.Interface
}

Store all types here that are reused throughout files Wrapper around all necessary clients used for endpoints

func (Resource) CheckHealth

func (r Resource) CheckHealth(request *restful.Request, response *restful.Response)

func (Resource) EstablishResourcesWebsocket

func (r Resource) EstablishResourcesWebsocket(request *restful.Request, response *restful.Response)

Establish websocket and subscribe to pipelinerun events

func (Resource) GetEndpoints added in v0.1.1

func (r Resource) GetEndpoints(request *restful.Request, response *restful.Response)

GetIngress returns the Ingress endpoint called "tektonDashboardIngressName" in the requested namespace

func (Resource) GetIngress

func (r Resource) GetIngress(request *restful.Request, response *restful.Response)

GetIngress returns the Ingress endpoint called "tektonDashboardIngressName" in the requested namespace

func (Resource) GetPipelineRunLog

func (r Resource) GetPipelineRunLog(request *restful.Request, response *restful.Response)

Get the logs for a given pipelinerun by name in a given namespace

func (Resource) GetProperties

func (r Resource) GetProperties(request *restful.Request, response *restful.Response)

GetProperties is used to get the installed namespace for the Dashboard, the version of the Tekton Dashboard, the version of Tekton Pipelines, whether or not one's running on OpenShift, when one's in read-only mode and Tekton Triggers version (if Installed)

func (Resource) GetTaskRunLog

func (r Resource) GetTaskRunLog(request *restful.Request, response *restful.Response)

Get the logs for a given task run by name in a given namespace

func (Resource) ProxyRequest

func (r Resource) ProxyRequest(request *restful.Request, response *restful.Response)

ProxyRequest does as the name suggests: proxies requests and logs what's going on

func (Resource) Rerun added in v0.3.0

func (r Resource) Rerun(name, namespace string) (*v1alpha1.PipelineRun, error)

func (Resource) RerunPipelineRun added in v0.3.0

func (r Resource) RerunPipelineRun(request *restful.Request, response *restful.Response)

RerunPipelineRun reruns a given PipelineRun by name in a given namespace

type ResourceBinding

type ResourceBinding struct {
	BINDINGNAME     string `json:"bindingname"`
	RESOURCEREFNAME string `json:"resourcerefname"`
}

ResourceBinding - a name and a reference to a resource

type TaskRunLog

type TaskRunLog struct {
	PodName string
	// Containers correlating to Task step definitions
	StepContainers []LogContainer
	// Additional Containers correlating to Task e.g. PipelineResources
	PodContainers  []LogContainer
	InitContainers []LogContainer
}

Jump to

Keyboard shortcuts

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