v1

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the cicd v1 API group +kubebuilder:object:generate=true +groupName=cicd.tmax.io

Index

Constants

View Source
const (
	CustomTaskGroup   = "cicd.tmax.io"
	CustomTaskVersion = "v1"
)
View Source
const (
	CustomTaskKindApproval = "ApprovalTask"

	CustomTaskApprovalParamKeyApprovers         = "approvers"
	CustomTaskApprovalParamKeyApproversCM       = "approvers-config-map"
	CustomTaskApprovalParamKeyMessage           = "message"
	CustomTaskApprovalParamKeyIntegrationJob    = "integration-job"
	CustomTaskApprovalParamKeyIntegrationJobJob = "integration-job-job"
	CustomTaskApprovalParamKeySender            = "sender"
	CustomTaskApprovalParamKeyLink              = "link"

	CustomTaskApprovalApproversConfigMapKey = "approvers"
)

Approval

View Source
const (
	CustomTaskKindEmail = "EmailTask"

	CustomTaskEmailParamKeyReceivers = "receivers"
	CustomTaskEmailParamKeyTitle     = "title"
	CustomTaskEmailParamKeyContent   = "content"
	CustomTaskEmailParamKeyIsHtml    = "isHtml"
)

Email

View Source
const (
	GithubDefaultApiUrl = "https://api.github.com"
	GithubDefaultHost   = "https://github.com"

	GitlabDefaultApiUrl = "https://gitlab.com"
	GitlabDefaultHost   = "https://gitlab.com"
)
View Source
const (
	GitTypeGitHub = GitType("github")
	GitTypeGitLab = GitType("gitlab")
)
View Source
const (
	IntegrationConfigConditionWebhookRegistered = status.ConditionType("webhook-registered")
	IntegrationConfigConditionReady             = status.ConditionType("ready")
)
View Source
const (
	IntegrationJobStatePending   = IntegrationJobState("Pending")
	IntegrationJobStateRunning   = IntegrationJobState("Running")
	IntegrationJobStateCompleted = IntegrationJobState("Completed")
	IntegrationJobStateFailed    = IntegrationJobState("Failed")
)
View Source
const (
	JobLabelPrefix = "cicd.tmax.io/"

	JobLabelConfig      = JobLabelPrefix + "integration-config"
	JobLabelType        = JobLabelPrefix + "integration-type"
	JobLabelId          = JobLabelPrefix + "integration-id"
	JobLabelRepository  = JobLabelPrefix + "repository"
	JobLabelPullRequest = JobLabelPrefix + "pull-request"

	RunLabelJob            = JobLabelPrefix + "integration-job"
	RunLabelJobId          = JobLabelPrefix + "integration-job-id"
	RunLabelRepository     = JobLabelRepository
	RunLabelPullRequest    = JobLabelPullRequest
	RunLabelPullRequestSha = JobLabelPrefix + "pull-request-sha"
	RunLabelSender         = JobLabelPrefix + "sender"
)
View Source
const (
	JobTypePreSubmit  = JobType("preSubmit")
	JobTypePostSubmit = JobType("postSubmit")
)
View Source
const (
	CommitStatusStateSuccess = CommitStatusState("success")
	CommitStatusStateFailure = CommitStatusState("failure")
	CommitStatusStateError   = CommitStatusState("error")
	CommitStatusStatePending = CommitStatusState("pending")
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cicd.tmax.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var CustomTaskApiVersion = fmt.Sprintf("%s/%s", CustomTaskGroup, CustomTaskVersion)

Functions

func GetSecretName

func GetSecretName(configName string) string

func GetServiceAccountName

func GetServiceAccountName(configName string) string

Types

type Approval

type Approval struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ApprovalSpec   `json:"spec,omitempty"`
	Status ApprovalStatus `json:"status,omitempty"`
}

Approval is the Schema for the approvals API +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.result",description="Current status of Approval" +kubebuilder:printcolumn:name="Created",type="date",JSONPath=".metadata.creationTimestamp",description="Created time" +kubebuilder:printcolumn:name="Decided",type="date",JSONPath=".status.decisionTime",description="Decided time"

func (*Approval) DeepCopy

func (in *Approval) DeepCopy() *Approval

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Approval.

func (*Approval) DeepCopyInto

func (in *Approval) DeepCopyInto(out *Approval)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Approval) DeepCopyObject

func (in *Approval) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ApprovalList

type ApprovalList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Approval `json:"items"`
}

ApprovalList contains a list of Approval

func (*ApprovalList) DeepCopy

func (in *ApprovalList) DeepCopy() *ApprovalList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApprovalList.

func (*ApprovalList) DeepCopyInto

func (in *ApprovalList) DeepCopyInto(out *ApprovalList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ApprovalList) DeepCopyObject

func (in *ApprovalList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ApprovalResult

type ApprovalResult string
const (
	ApprovalResultWaiting  ApprovalResult = "Waiting"
	ApprovalResultApproved ApprovalResult = "Approved"
	ApprovalResultRejected ApprovalResult = "Rejected"
	ApprovalResultError    ApprovalResult = "Error"

	ApprovalConditionSentRequestMail = status.ConditionType("SentRequestMail")
	ApprovalConditionSentResultMail  = status.ConditionType("SentResultMail")
)

type ApprovalSpec

type ApprovalSpec struct {
	// PodName represents the name of the pod to be approved to proceed
	// Deprecated: not used from HyperCloud5, only for the backward compatibility with HyperCloud4
	PodName string `json:"podName,omitempty"`

	// SkipSendMail describes whether or not to send mail for request/result for approvers
	SkipSendMail bool `json:"skipSendMail,omitempty"`

	// PipelineRun points the actual pipeline run object which created this Approval
	PipelineRun string `json:"pipelineRun,omitempty"`

	// IntegrationJob is a related IntegrationJob name (maybe a grand-parent of Approval)
	IntegrationJob string `json:"integrationJob,omitempty"`

	// JobName is a name of actual job in IntegrationJob
	JobName string `json:"jobName,omitempty"`

	// Message is a message from requester
	Message string `json:"message,omitempty"`

	// Sender is a requester (probably be pull-request author or pusher)
	Sender string `json:"sender,omitempty"`

	// Link is a description link approvers may refer to
	Link string `json:"link,omitempty"`

	// Users are the list of the users who are requested to approve the Approval
	Users []string `json:"users"`
}

ApprovalSpec defines the desired state of Approval

func (*ApprovalSpec) DeepCopy

func (in *ApprovalSpec) DeepCopy() *ApprovalSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApprovalSpec.

func (*ApprovalSpec) DeepCopyInto

func (in *ApprovalSpec) DeepCopyInto(out *ApprovalSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ApprovalStatus

type ApprovalStatus struct {
	// Decision result of Approval
	Result ApprovalResult `json:"result"`

	// Approver is a user who actually approved
	Approver string `json:"approver,omitempty"`

	// Decision message
	Reason string `json:"reason,omitempty"`

	// Decision time of Approval
	DecisionTime *metav1.Time `json:"decisionTime,omitempty"`

	// Conditions of Approval
	Conditions status.Conditions `json:"conditions"`
}

ApprovalStatus defines the observed state of Approval

func (*ApprovalStatus) DeepCopy

func (in *ApprovalStatus) DeepCopy() *ApprovalStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApprovalStatus.

func (*ApprovalStatus) DeepCopyInto

func (in *ApprovalStatus) DeepCopyInto(out *ApprovalStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ApprovalStatus) GetDecisionTimeInZone

func (a *ApprovalStatus) GetDecisionTimeInZone(zone string) (*time.Time, error)

type CommitStatusState

type CommitStatusState string

type GitConfig

type GitConfig struct {
	// Type for git remote server
	// +kubebuilder:validation:Enum=github;gitlab
	Type GitType `json:"type"`

	// Repository name of git repository (in <org>/<repo> form, e.g., tmax-cloud/cicd-operator)
	// +kubebuilder:validation:Pattern=.+/.+
	Repository string `json:"repository"`

	// ApiUrl for api server (e.g., https://api.github.com for github type),
	// for the case where the git repository is self-hosted (should contain specific protocol otherwise webhook server returns error)
	ApiUrl string `json:"apiUrl,omitempty"`

	// Token
	Token GitToken `json:"token"`
}

func (*GitConfig) DeepCopy

func (in *GitConfig) DeepCopy() *GitConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitConfig.

func (*GitConfig) DeepCopyInto

func (in *GitConfig) DeepCopyInto(out *GitConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GitConfig) GetApiUrl

func (config *GitConfig) GetApiUrl() string

Returns ApiUrl for api server

func (*GitConfig) GetGitHost

func (config *GitConfig) GetGitHost() (string, error)

Get Git host

type GitToken

type GitToken struct {
	// Value is un-encrypted plain string of git token, not recommended
	Value string `json:"value,omitempty"`

	// ValueFrom refers secret. Recommended
	ValueFrom *GitTokenFrom `json:"valueFrom,omitempty"`
}

func (*GitToken) DeepCopy

func (in *GitToken) DeepCopy() *GitToken

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitToken.

func (*GitToken) DeepCopyInto

func (in *GitToken) DeepCopyInto(out *GitToken)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitTokenFrom

type GitTokenFrom struct {
	SecretKeyRef corev1.SecretKeySelector `json:"secretKeyRef"`
}

func (*GitTokenFrom) DeepCopy

func (in *GitTokenFrom) DeepCopy() *GitTokenFrom

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitTokenFrom.

func (*GitTokenFrom) DeepCopyInto

func (in *GitTokenFrom) DeepCopyInto(out *GitTokenFrom)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitType

type GitType string

type IntegrationConfig

type IntegrationConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   IntegrationConfigSpec   `json:"spec,omitempty"`
	Status IntegrationConfigStatus `json:"status,omitempty"`
}

IntegrationConfig is the Schema for the integrationconfigs API +kubebuilder:resource:shortName="ic"

func (*IntegrationConfig) DeepCopy

func (in *IntegrationConfig) DeepCopy() *IntegrationConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationConfig.

func (*IntegrationConfig) DeepCopyInto

func (in *IntegrationConfig) DeepCopyInto(out *IntegrationConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IntegrationConfig) DeepCopyObject

func (in *IntegrationConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IntegrationConfig) GetToken

func (i *IntegrationConfig) GetToken(c client.Client) (string, error)

func (*IntegrationConfig) GetWebhookServerAddress

func (i *IntegrationConfig) GetWebhookServerAddress() string

Returns Server address which webhook events will be received

type IntegrationConfigJobs

type IntegrationConfigJobs struct {
	// PreSubmit jobs are for pull-request events
	PreSubmit []Job `json:"preSubmit,omitempty"`

	// PostSubmit jobs are for push events (including tag events)
	PostSubmit []Job `json:"postSubmit,omitempty"`
}

func (*IntegrationConfigJobs) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationConfigJobs.

func (*IntegrationConfigJobs) DeepCopyInto

func (in *IntegrationConfigJobs) DeepCopyInto(out *IntegrationConfigJobs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationConfigList

type IntegrationConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []IntegrationConfig `json:"items"`
}

IntegrationConfigList contains a list of IntegrationConfig

func (*IntegrationConfigList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationConfigList.

func (*IntegrationConfigList) DeepCopyInto

func (in *IntegrationConfigList) DeepCopyInto(out *IntegrationConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IntegrationConfigList) DeepCopyObject

func (in *IntegrationConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IntegrationConfigSpec

type IntegrationConfigSpec struct {
	// Git config for target repository
	Git GitConfig `json:"git"`

	// Secrets are the list of secret names which are included in service account
	Secrets []corev1.LocalObjectReference `json:"secrets,omitempty"`

	// Workspaces list
	Workspaces []tektonv1beta1.WorkspaceBinding `json:"workspaces,omitempty"`

	// Jobs specify the tasks to be executed
	Jobs IntegrationConfigJobs `json:"jobs"`
}

IntegrationConfigSpec defines the desired state of IntegrationConfig

func (*IntegrationConfigSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationConfigSpec.

func (*IntegrationConfigSpec) DeepCopyInto

func (in *IntegrationConfigSpec) DeepCopyInto(out *IntegrationConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationConfigStatus

type IntegrationConfigStatus struct {
	// Conditions of IntegrationConfig
	Conditions status.Conditions `json:"conditions"`
	Secrets    string            `json:"secrets,omitempty"`
}

IntegrationConfigStatus defines the observed state of IntegrationConfig

func (*IntegrationConfigStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationConfigStatus.

func (*IntegrationConfigStatus) DeepCopyInto

func (in *IntegrationConfigStatus) DeepCopyInto(out *IntegrationConfigStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJob

type IntegrationJob struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   IntegrationJobSpec   `json:"spec,omitempty"`
	Status IntegrationJobStatus `json:"status,omitempty"`
}

IntegrationJob is the Schema for the integrationjobs API +kubebuilder:resource:shortName="ij" +kubebuilder:printcolumn:name="State",type="string",JSONPath=".status.state",description="Current status of IntegrationJob" +kubebuilder:printcolumn:name="StartTime",type="date",JSONPath=".status.startTime",description="Start time" +kubebuilder:printcolumn:name="CompletionTime",type="date",JSONPath=".status.completionTime",description="Completion time"

func (*IntegrationJob) DeepCopy

func (in *IntegrationJob) DeepCopy() *IntegrationJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJob.

func (*IntegrationJob) DeepCopyInto

func (in *IntegrationJob) DeepCopyInto(out *IntegrationJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IntegrationJob) DeepCopyObject

func (in *IntegrationJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*IntegrationJob) GetReportServerAddress

func (i *IntegrationJob) GetReportServerAddress(jobName string) string

Returns Server address for reports (IntegrationJob details)

type IntegrationJobConfigRef

type IntegrationJobConfigRef struct {
	Name string  `json:"name"`
	Type JobType `json:"type"`
}

func (*IntegrationJobConfigRef) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobConfigRef.

func (*IntegrationJobConfigRef) DeepCopyInto

func (in *IntegrationJobConfigRef) DeepCopyInto(out *IntegrationJobConfigRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJobList

type IntegrationJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []IntegrationJob `json:"items"`
}

IntegrationJobList contains a list of IntegrationJob

func (*IntegrationJobList) DeepCopy

func (in *IntegrationJobList) DeepCopy() *IntegrationJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobList.

func (*IntegrationJobList) DeepCopyInto

func (in *IntegrationJobList) DeepCopyInto(out *IntegrationJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IntegrationJobList) DeepCopyObject

func (in *IntegrationJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type IntegrationJobRefs

type IntegrationJobRefs struct {
	// Repository name of git repository (in <org>/<repo> form, e.g., tmax-cloud/cicd-operator)
	// +kubebuilder:validation:Pattern=.+/.+
	Repository string `json:"repository"`

	// Link is a full url of the repository
	Link string `json:"link"`

	// Sender is a git user who triggered the webhook
	Sender string `json:"sender"`

	// Base is a base pointer for base commit for the pull request
	// If Pull is nil (i.e., is push event), Base works as Head
	Base IntegrationJobRefsBase `json:"base"`

	// Pull represents pull request head commit
	Pull *IntegrationJobRefsPull `json:"pull,omitempty"`
}

func (*IntegrationJobRefs) DeepCopy

func (in *IntegrationJobRefs) DeepCopy() *IntegrationJobRefs

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobRefs.

func (*IntegrationJobRefs) DeepCopyInto

func (in *IntegrationJobRefs) DeepCopyInto(out *IntegrationJobRefs)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJobRefsBase

type IntegrationJobRefsBase struct {
	Ref  string `json:"ref"`
	Link string `json:"link"`
	Sha  string `json:"sha"`
}

func (*IntegrationJobRefsBase) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobRefsBase.

func (*IntegrationJobRefsBase) DeepCopyInto

func (in *IntegrationJobRefsBase) DeepCopyInto(out *IntegrationJobRefsBase)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJobRefsPull

type IntegrationJobRefsPull struct {
	Id     int                          `json:"id"`
	Ref    string                       `json:"ref"`
	Sha    string                       `json:"sha"`
	Link   string                       `json:"link"`
	Author IntegrationJobRefsPullAuthor `json:"author"`
}

func (*IntegrationJobRefsPull) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobRefsPull.

func (*IntegrationJobRefsPull) DeepCopyInto

func (in *IntegrationJobRefsPull) DeepCopyInto(out *IntegrationJobRefsPull)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJobRefsPullAuthor

type IntegrationJobRefsPullAuthor struct {
	Name string `json:"name"`
}

func (*IntegrationJobRefsPullAuthor) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobRefsPullAuthor.

func (*IntegrationJobRefsPullAuthor) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJobSpec

type IntegrationJobSpec struct {
	// ConfigRef refers to the corresponding IntegrationConfig
	ConfigRef IntegrationJobConfigRef `json:"configRef"`

	// Id is a unique random string for the IntegrationJob
	Id string `json:"id"`

	// Workspaces list
	Workspaces []tektonv1beta1.WorkspaceBinding `json:"workspaces,omitempty"`

	// Jobs are the tasks to be executed
	Jobs []Job `json:"jobs"`

	// Refs
	Refs IntegrationJobRefs `json:"refs"`
}

IntegrationJobSpec defines the desired state of IntegrationJob

func (*IntegrationJobSpec) DeepCopy

func (in *IntegrationJobSpec) DeepCopy() *IntegrationJobSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobSpec.

func (*IntegrationJobSpec) DeepCopyInto

func (in *IntegrationJobSpec) DeepCopyInto(out *IntegrationJobSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IntegrationJobState

type IntegrationJobState string

type IntegrationJobStatus

type IntegrationJobStatus struct {
	// State is a current state of the IntegrationJob
	State IntegrationJobState `json:"state"`

	// Message is a message for the IntegrationJob (normally an error string)
	Message string `json:"message,omitempty"`

	// StartTime is actual time the task started
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is a time when the job is completed
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// Jobs are status list for each Job in the IntegrationJob
	Jobs []JobStatus `json:"jobs,omitempty"`
}

IntegrationJobStatus defines the observed state of IntegrationJob

func (*IntegrationJobStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationJobStatus.

func (*IntegrationJobStatus) DeepCopyInto

func (in *IntegrationJobStatus) DeepCopyInto(out *IntegrationJobStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*IntegrationJobStatus) SetDefaults

func (s *IntegrationJobStatus) SetDefaults() error

type Job

type Job struct {
	corev1.Container `json:",inline"`

	// Script will override command of container
	Script string `json:"script,omitempty"`

	// TektonTask is for referring local Tasks or the Tasks registered in tekton catalog github repo.
	// Not implemented yet
	TektonTask *TektonTask `json:"tektonTask,omitempty"`

	// SkipCheckout describes whether or not to checkout from git before
	SkipCheckout bool `json:"skipCheckout,omitempty"`

	// When is condition for running the job
	When *JobWhen `json:"when,omitempty"`

	// After configures which jobs should be executed before this job runs
	After []string `json:"after,omitempty"`

	// Approval
	Approval *JobApproval `json:"approval,omitempty"`

	// Email
	Email *JobEmail `json:"email,omitempty"`
}

func (*Job) DeepCopy

func (in *Job) DeepCopy() *Job

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Job.

func (*Job) DeepCopyInto

func (in *Job) DeepCopyInto(out *Job)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobApproval

type JobApproval struct {
	// Approvers is a list of approvers, in a form of <User name>=<Email> (Email is optional)
	// e.g., admin-tmax.co.kr
	// e.g., admin-tmax.co.kr=sunghyun_kim3@tmax.co.kr
	Approvers []string `json:"approvers,omitempty"`

	// ApproversConfigMap is a configMap Name containing
	// approvers list should exist in configMap's 'approvers' key, as comma(,) separated list
	// e.g., admin-tmax.co.kr=sunghyun_kim3@tmax.co.kr,test-tmax.co.kr=kyunghoon_min@tmax.co.kr
	ApproversConfigMap *corev1.LocalObjectReference `json:"approversConfigMap,omitempty"`

	// RequestMessage is a message to be sent to approvers by email
	RequestMessage string `json:"requestMessage"`
}

JobApproval describes who can approve it

func (*JobApproval) DeepCopy

func (in *JobApproval) DeepCopy() *JobApproval

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobApproval.

func (*JobApproval) DeepCopyInto

func (in *JobApproval) DeepCopyInto(out *JobApproval)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobEmail

type JobEmail struct {
	// Receivers is a list of email receivers
	Receivers []string `json:"receivers,omitempty"`

	// Title of the email
	Title string `json:"title"`

	// Content of the email
	Content string `json:"content"`

	// IsHtml describes if it's html content
	IsHtml bool `json:"isHtml,omitempty"`
}

JobEmail sends email to receivers

func (*JobEmail) DeepCopy

func (in *JobEmail) DeepCopy() *JobEmail

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobEmail.

func (*JobEmail) DeepCopyInto

func (in *JobEmail) DeepCopyInto(out *JobEmail)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobStatus

type JobStatus struct {
	// Name is a job name
	Name string `json:"name"`

	// StartTime is a timestamp when the job is started
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// CompletionTime is a timestamp when the job is started
	CompletionTime *metav1.Time `json:"completionTime,omitempty"`

	// State is current state of this job
	// It is actually a conversion of tekton task run's Status.Conditions[0].Reason
	State CommitStatusState `json:"state"`

	// Message is current state description for this job
	// It is actually tekton task run's Status.Conditions[0].Message
	Message string `json:"message"`

	// PodName is a name of pod where the job is running
	PodName string `json:"podName,omitempty"`

	// Containers is status list for each step in the job
	Containers []tektonv1beta1.StepState `json:"containers,omitempty"`
}

JobStatus is a current status for each job

func (*JobStatus) DeepCopy

func (in *JobStatus) DeepCopy() *JobStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobStatus.

func (*JobStatus) DeepCopyInto

func (in *JobStatus) DeepCopyInto(out *JobStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobTaskRef

type JobTaskRef struct {
	// Name for local Tasks
	Name string `json:"name,omitempty"`

	// Catalog is a name of the task @ tekton catalog github repo. (e.g., s2i@0.2)
	// FYI: https://github.com/tektoncd/catalog
	Catalog string `json:"catalog,omitempty"`
}

func (*JobTaskRef) DeepCopy

func (in *JobTaskRef) DeepCopy() *JobTaskRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobTaskRef.

func (*JobTaskRef) DeepCopyInto

func (in *JobTaskRef) DeepCopyInto(out *JobTaskRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobType

type JobType string

type JobWhen

type JobWhen struct {
	Branch     []string `json:"branch,omitempty"`
	SkipBranch []string `json:"skipBranch,omitempty"`

	Tag     []string `json:"tag,omitempty"`
	SkipTag []string `json:"skipTag,omitempty"`
}

func (*JobWhen) DeepCopy

func (in *JobWhen) DeepCopy() *JobWhen

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobWhen.

func (*JobWhen) DeepCopyInto

func (in *JobWhen) DeepCopyInto(out *JobWhen)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TektonTask

type TektonTask struct {
	// TaskRef refers to the existing Task in local cluster or to the tekton catalog github repo.
	TaskRef JobTaskRef `json:"taskRef"`

	// Params are input params for the task
	Params []tektonv1beta1.Param `json:"params,omitempty"`

	// Resources are input/output resources for the task
	Resources *tektonv1beta1.TaskRunResources `json:"resources,omitempty"`

	// Workspaces are workspaces for the task
	Workspaces []tektonv1beta1.WorkspaceBinding `json:"workspaces,omitempty"`
}

func (*TektonTask) DeepCopy

func (in *TektonTask) DeepCopy() *TektonTask

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TektonTask.

func (*TektonTask) DeepCopyInto

func (in *TektonTask) DeepCopyInto(out *TektonTask)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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