From 4f516eed1e6e54475031677e2a91a0d675d2c0ab Mon Sep 17 00:00:00 2001 From: Christie Wilson Date: Sat, 1 Dec 2018 10:10:54 -0800 Subject: [PATCH] Add `Results` fields to `TaskRun` and `PipelineRun` status When a user kicks off a run, they will provide an endpoint to upload logs to (initial implementation will be in #107). The corresponding fields in `status` will indicate where the logs actually got uplaoded to. Once we actually get to #107, and especially once we start supporting endpoints other than GCS, we may find this isn't useful and remove it. Fixes #146 --- pkg/apis/pipeline/v1alpha1/pipelinerun_types.go | 2 ++ pkg/apis/pipeline/v1alpha1/taskrun_types.go | 3 +++ pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go | 2 ++ 3 files changed, 7 insertions(+) diff --git a/pkg/apis/pipeline/v1alpha1/pipelinerun_types.go b/pkg/apis/pipeline/v1alpha1/pipelinerun_types.go index 228a5af6840..43f3e582fc1 100644 --- a/pkg/apis/pipeline/v1alpha1/pipelinerun_types.go +++ b/pkg/apis/pipeline/v1alpha1/pipelinerun_types.go @@ -111,6 +111,8 @@ type PipelineTriggerRef struct { // PipelineRunStatus defines the observed state of PipelineRun type PipelineRunStatus struct { Conditions duckv1alpha1.Conditions `json:"conditions"` + // In #107 should be updated to hold the location logs have been uploaded to + Results Results `json:"results"` // map of TaskRun Status with the taskRun name as the key //+optional TaskRuns map[string]TaskRunStatus `json:"taskRuns,omitempty"` diff --git a/pkg/apis/pipeline/v1alpha1/taskrun_types.go b/pkg/apis/pipeline/v1alpha1/taskrun_types.go index d08c9732744..658c2172245 100644 --- a/pkg/apis/pipeline/v1alpha1/taskrun_types.go +++ b/pkg/apis/pipeline/v1alpha1/taskrun_types.go @@ -104,6 +104,9 @@ type TaskRunStatus struct { // +optional Conditions duckv1alpha1.Conditions `json:"conditions,omitempty"` + // In #107 should be updated to hold the location logs have been uploaded to + Results Results `json:"results"` + // PodName is the name of the pod responsible for executing this task's steps. PodName string `json:"podName"` diff --git a/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go index ee2061dd558..8c60598a6da 100644 --- a/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go @@ -454,6 +454,7 @@ func (in *PipelineRunStatus) DeepCopyInto(out *PipelineRunStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Results = in.Results if in.TaskRuns != nil { in, out := &in.TaskRuns, &out.TaskRuns *out = make(map[string]TaskRunStatus, len(*in)) @@ -1009,6 +1010,7 @@ func (in *TaskRunStatus) DeepCopyInto(out *TaskRunStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.Results = in.Results if in.StartTime != nil { in, out := &in.StartTime, &out.StartTime if *in == nil {