mirror of
https://github.com/rancher/types.git
synced 2025-07-31 20:55:00 +00:00
add pipeline conditions & Pr trigger
This commit is contained in:
parent
3d58dd8a97
commit
5882fb9114
@ -1,10 +1,19 @@
|
||||
package v3
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/condition"
|
||||
"github.com/rancher/norman/types"
|
||||
"k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
type PipelineConditionType string
|
||||
|
||||
const (
|
||||
PipelineExecutionConditonProvisioned condition.Cond = "Provisioned"
|
||||
PipelineExecutionConditionCompleted condition.Cond = "Completed"
|
||||
)
|
||||
|
||||
type ClusterPipeline struct {
|
||||
types.Namespaced
|
||||
|
||||
@ -101,7 +110,8 @@ type PipelineStatus struct {
|
||||
|
||||
type PipelineSpec struct {
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
TriggerWebhook bool `json:"triggerWebhook,omitempty" yaml:"triggerWebhook,omitempty"`
|
||||
TriggerWebhookPush bool `json:"triggerWebhookPush,omitempty" yaml:"triggerWebhookPush,omitempty"`
|
||||
TriggerWebhookPr bool `json:"triggerWebhookPr,omitempty" yaml:"triggerWebhookPr,omitempty"`
|
||||
TriggerCronTimezone string `json:"triggerCronTimezone,omitempty" yaml:"triggerCronTimezone,omitempty"`
|
||||
TriggerCronExpression string `json:"triggerCronExpression,omitempty" yaml:"triggerCronExpression,omitempty"`
|
||||
|
||||
@ -110,6 +120,21 @@ type PipelineSpec struct {
|
||||
Templates map[string]string `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
}
|
||||
|
||||
type PipelineCondition struct {
|
||||
// Type of cluster condition.
|
||||
Type PipelineConditionType `json:"type"`
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status v1.ConditionStatus `json:"status"`
|
||||
// The last time this condition was updated.
|
||||
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
|
||||
// Last time the condition transitioned from one status to another.
|
||||
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
|
||||
// The reason for the condition's last transition.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
// Human-readable message indicating details about last transition
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
type Stage struct {
|
||||
Name string `json:"name,omitempty" yaml:"name,omitempty" norman:"required"`
|
||||
Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty" norman:"required"`
|
||||
@ -154,6 +179,8 @@ type PipelineExecutionSpec struct {
|
||||
}
|
||||
|
||||
type PipelineExecutionStatus struct {
|
||||
Conditions []PipelineCondition `json:"conditions,omitempty"`
|
||||
|
||||
Commit string `json:"commit,omitempty"`
|
||||
ExecutionState string `json:"executionState,omitempty"`
|
||||
Started string `json:"started,omitempty"`
|
||||
@ -196,6 +223,7 @@ type SourceCodeRepositorySpec struct {
|
||||
URL string `json:"url,omitempty"`
|
||||
Permissions RepoPerm `json:"permissions,omitempty"`
|
||||
Language string `json:"language,omitempty"`
|
||||
DefaultBranch string `json:"defaultBranch,omitempty"`
|
||||
}
|
||||
|
||||
type SourceCodeRepositoryStatus struct {
|
||||
|
Loading…
Reference in New Issue
Block a user