diff --git a/docs/pipeline-api.md b/docs/pipeline-api.md
index f5165ea121b..a3b26dc54df 100644
--- a/docs/pipeline-api.md
+++ b/docs/pipeline-api.md
@@ -7076,6 +7076,18 @@ CustomRunSpecStatusMessage
+
extraFields
k8s.io/apimachinery/pkg/runtime.RawExtension
diff --git a/pkg/apis/pipeline/v1beta1/customrun_types.go b/pkg/apis/pipeline/v1beta1/customrun_types.go
index 97ce4114baa..a24f57a1e04 100644
--- a/pkg/apis/pipeline/v1beta1/customrun_types.go
+++ b/pkg/apis/pipeline/v1beta1/customrun_types.go
@@ -64,6 +64,10 @@ type CustomRunSpec struct {
// +optional
StatusMessage CustomRunSpecStatusMessage `json:"statusMessage,omitempty"`
+ // Used for propagating retries count to custom tasks
+ // +optional
+ Retries int `json:"retries,omitempty"`
+
// +optional
ServiceAccountName string `json:"serviceAccountName"`
diff --git a/pkg/apis/pipeline/v1beta1/customrun_types_test.go b/pkg/apis/pipeline/v1beta1/customrun_types_test.go
index 881dc704b26..c562f439676 100644
--- a/pkg/apis/pipeline/v1beta1/customrun_types_test.go
+++ b/pkg/apis/pipeline/v1beta1/customrun_types_test.go
@@ -198,6 +198,7 @@ kind: CustomRun
metadata:
name: run
spec:
+ retries: 3
customRef:
apiVersion: example.dev/v0
kind: Example
@@ -227,6 +228,7 @@ status:
Name: "run",
},
Spec: v1beta1.CustomRunSpec{
+ Retries: 3,
CustomRef: &v1beta1.TaskRef{
APIVersion: "example.dev/v0",
Kind: "Example",
diff --git a/pkg/apis/pipeline/v1beta1/openapi_generated.go b/pkg/apis/pipeline/v1beta1/openapi_generated.go
index 83a883b5ce5..10ee016640b 100644
--- a/pkg/apis/pipeline/v1beta1/openapi_generated.go
+++ b/pkg/apis/pipeline/v1beta1/openapi_generated.go
@@ -803,6 +803,13 @@ func schema_pkg_apis_pipeline_v1beta1_CustomRunSpec(ref common.ReferenceCallback
Format: "",
},
},
+ "retries": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Used for propagating retries count to custom tasks",
+ Type: []string{"integer"},
+ Format: "int32",
+ },
+ },
"serviceAccountName": {
SchemaProps: spec.SchemaProps{
Default: "",
diff --git a/pkg/apis/pipeline/v1beta1/swagger.json b/pkg/apis/pipeline/v1beta1/swagger.json
index 45a88eeb54f..1f451832821 100644
--- a/pkg/apis/pipeline/v1beta1/swagger.json
+++ b/pkg/apis/pipeline/v1beta1/swagger.json
@@ -525,6 +525,11 @@
},
"x-kubernetes-list-type": "atomic"
},
+ "retries": {
+ "description": "Used for propagating retries count to custom tasks",
+ "type": "integer",
+ "format": "int32"
+ },
"serviceAccountName": {
"type": "string",
"default": ""
diff --git a/pkg/apis/run/v1beta1/customrunstatus_types.go b/pkg/apis/run/v1beta1/customrunstatus_types.go
index c5db17ea18f..ff41f0e4c83 100644
--- a/pkg/apis/run/v1beta1/customrunstatus_types.go
+++ b/pkg/apis/run/v1beta1/customrunstatus_types.go
@@ -57,6 +57,10 @@ type CustomRunStatusFields struct {
// +optional
Results []CustomRunResult `json:"results,omitempty"`
+ // RetriesStatus contains the history of CustomRunStatus, in case of a retry.
+ // +optional
+ RetriesStatus []CustomRunStatus `json:"retriesStatus,omitempty"`
+
// ExtraFields holds arbitrary fields provided by the custom task
// controller.
ExtraFields runtime.RawExtension `json:"extraFields,omitempty"`
diff --git a/test/artifact_bucket_test.go b/test/artifact_bucket_test.go
index 556e0efde1a..125cae58d39 100644
--- a/test/artifact_bucket_test.go
+++ b/test/artifact_bucket_test.go
@@ -147,9 +147,9 @@ metadata:
spec:
params:
- name: Url
- value: https://github.com/pivotal-nader-ziada/gohelloworld
+ value: https://github.com/pivotal-nader-ziada/gohelloworld
- name: Revision
- value: master
+ value: master
type: git
`, helloworldResourceName))
if _, err := c.V1alpha1PipelineResourceClient.Create(ctx, helloworldResource, metav1.CreateOptions{}); err != nil {
|