Documentation ¶
Overview ¶
Copyright 2020 WILDCARD
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 24/01/2021
Copyright 2020 WILDCARD ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 06/02/2021
Copyright 2020 WILDCARD ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 06/02/2021
Copyright 2020 WILDCARD ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 27/01/2021
Copyright 2020 WILDCARD ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Created on 24/01/2021
Index ¶
- Variables
- func Condition(c v1beta1.Conditions) (status string, reason string)
- func FormattedStepName(name string) string
- func IsTerminated(c v1beta1.Conditions) bool
- func StepReasonExists(state tkn.StepState) string
- type PipelineRunPayload
- func (PipelineRunPayload) GetTask(taskRunName string, taskrunStatus *tkn.PipelineRunTaskRunStatus) Task
- func (p *PipelineRunPayload) GetTasks(pr *tkn.PipelineRun) (ts Tasks)
- func (p *PipelineRunPayload) SetCondition(c v1beta1.Conditions)
- func (p *PipelineRunPayload) UpdateTaskRuns(taskrun TaskRunPayload)
- type Step
- type Task
- type TaskRunPayload
- type Tasks
- type Tekton
- func (t *Tekton) GetClient(namespace string) *cli.Clients
- func (t *Tekton) GetWatch(kind string, name string) (w watch.Interface)
- func (t *Tekton) PipelineRunSupervise() error
- func (t *Tekton) SetClient(clients *cli.Clients)
- func (t *Tekton) SetParam(params cli.TektonParams)
- func (t *Tekton) SupTasks(pr *tkn.PipelineRun)
- func (t *Tekton) TaskRunSupervise(nn types.NamespacedName) error
- func (t *Tekton) UpdatePayloadTask(task Task)
Constants ¶
This section is empty.
Variables ¶
var Reason = map[string]string{
"default": "",
"couldntgetpipeline": "Internal error",
"invalidworkspacebindings": "Internal error : Workspace resource missing",
"invalidserviceaccountmappings": "Internal error : invalid access",
"invalidpipelineresourcebindings": "Internal error : invalid pipeline resource",
"parametertypemismatch": "Internal error : Pipeline generation failed",
"couldntgettask": "Internal error : task missing",
"couldntgetresource": "Internal error : missing resource",
"pipelineruntimeout": "Pipeline timeout",
"couldntgetcondition": "Internal error : Condition missing",
"parametermissing": "Internal error : Pipeline",
"pipelinevalidationfailed": "Internal error : Pipeline generation failed",
"pipelineinvalidgraph": "Internal error : Pipeline invalid",
"pipelineruncancelled": "Pipeline cancelled",
"pipelineruncouldntcancel": "Pipeline couldn't cancel",
"pending": "Creating steps",
}
Reason ...
Functions ¶
func Condition ¶
func Condition(c v1beta1.Conditions) (status string, reason string)
Condition returns a human readable text based on the status of the Condition
func FormattedStepName ¶ added in v0.1.2
FormattedStepName ...
func IsTerminated ¶
func IsTerminated(c v1beta1.Conditions) bool
IsTerminated returns if a pod is terminated
Types ¶
type PipelineRunPayload ¶
type PipelineRunPayload struct { NamespacedName types.NamespacedName `json:"namespaced_name"` Status string `json:"status"` Message string `json:"message"` RepoURL string `json:"repo_url"` Branch string `json:"branch"` CommitID string `json:"commit_id"` CommitMsg string `json:"commit_msg"` TaskRuns []TaskRunPayload `json:"task_runs"` ProjectID int64 `json:"project_id"` PipelineID int64 `json:"pipeline_id"` StartTime int64 `json:"start_time"` CompletionTime int64 `json:"completion_time"` }
func (PipelineRunPayload) GetTask ¶
func (PipelineRunPayload) GetTask(taskRunName string, taskrunStatus *tkn.PipelineRunTaskRunStatus) Task
func (*PipelineRunPayload) GetTasks ¶
func (p *PipelineRunPayload) GetTasks(pr *tkn.PipelineRun) (ts Tasks)
func (*PipelineRunPayload) SetCondition ¶
func (p *PipelineRunPayload) SetCondition(c v1beta1.Conditions)
func (*PipelineRunPayload) UpdateTaskRuns ¶
func (p *PipelineRunPayload) UpdateTaskRuns(taskrun TaskRunPayload)
type Step ¶
type Step struct { Name string `json:"name"` RawName string `json:"raw_name"` Status string `json:"status"` Message string `json:"message"` }
func GetSteps ¶
func GetSteps(status tkn.TaskRunStatus) (steps []Step)
type Task ¶
type Task struct { TaskRunName string `json:"-"` Name string `json:"name"` Status string `json:"status"` StartTime int64 `json:"start_time"` CompletionTime int64 `json:"completion_time"` Duration string `json:"duration"` Message string `json:"message"` Steps []Step `json:"steps"` CompletionTimeRaw *metav1.Time `json:"completion_time_raw"` StartTimeRaw *metav1.Time `json:"start_time_raw"` }
type TaskRunPayload ¶
type TaskRunPayload struct { NamespacedName types.NamespacedName `json:"namespaced_name"` Tasks []Task `json:"tasks"` }
func (*TaskRunPayload) UpdateTask ¶
func (t *TaskRunPayload) UpdateTask(newTask Task)
type Tekton ¶
type Tekton struct { ProjectID int64 `json:"project_id"` PipelineID int64 `json:"pipeline_id"` PipelineRun PipelineRunPayload `json:"pipeline_run"` Log logr.Logger `json:"-"` }
func (*Tekton) PipelineRunSupervise ¶
PipelineRunSupervise watches all pod event created by pipelinerun
func (*Tekton) SetParam ¶
func (t *Tekton) SetParam(params cli.TektonParams)
func (*Tekton) TaskRunSupervise ¶
func (t *Tekton) TaskRunSupervise(nn types.NamespacedName) error
PipelineRunSupervise watches all pod event created by pipelinerun