mirror of
https://github.com/rancher/types.git
synced 2025-09-02 05:35:16 +00:00
Merge pull request #286 from gitlawr/pipeline_yaml
Add templates field in pipelinespec
This commit is contained in:
@@ -21,6 +21,8 @@ type Pipeline struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
ProjectName string `json:"projectName" yaml:"projectName" norman:"required,type=reference[project]"`
|
||||
|
||||
Spec PipelineSpec `json:"spec"`
|
||||
Status PipelineStatus `json:"status"`
|
||||
}
|
||||
@@ -31,6 +33,8 @@ type PipelineExecution struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
ProjectName string `json:"projectName" yaml:"projectName" norman:"required,type=reference[project]"`
|
||||
|
||||
Spec PipelineExecutionSpec `json:"spec"`
|
||||
Status PipelineExecutionStatus `json:"status"`
|
||||
}
|
||||
@@ -41,6 +45,8 @@ type PipelineExecutionLog struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
ProjectName string `json:"projectName" yaml:"projectName" norman:"required,type=reference[project]"`
|
||||
|
||||
Spec PipelineExecutionLogSpec `json:"spec"`
|
||||
}
|
||||
|
||||
@@ -89,14 +95,14 @@ type PipelineStatus struct {
|
||||
}
|
||||
|
||||
type PipelineSpec struct {
|
||||
ProjectName string `json:"projectName" yaml:"projectName" norman:"required,type=reference[project]"`
|
||||
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty" norman:"required"`
|
||||
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
|
||||
TriggerWebhook bool `json:"triggerWebhook,omitempty" yaml:"triggerWebhook,omitempty"`
|
||||
TriggerCronTimezone string `json:"triggerCronTimezone,omitempty" yaml:"triggerCronTimezone,omitempty"`
|
||||
TriggerCronExpression string `json:"triggerCronExpression,omitempty" yaml:"triggerCronExpression,omitempty"`
|
||||
|
||||
Stages []Stage `json:"stages,omitempty" yaml:"stages,omitempty" norman:"required"`
|
||||
Stages []Stage `json:"stages,omitempty" yaml:"stages,omitempty"`
|
||||
|
||||
Templates map[string]string `json:"templates,omitempty" yaml:"templates,omitempty"`
|
||||
}
|
||||
|
||||
type Stage struct {
|
||||
@@ -135,7 +141,6 @@ type PublishImageConfig struct {
|
||||
}
|
||||
|
||||
type PipelineExecutionSpec struct {
|
||||
ProjectName string `json:"projectName" norman:"required,type=reference[project]"`
|
||||
PipelineName string `json:"pipelineName" norman:"required,type=reference[pipeline]"`
|
||||
Run int `json:"run,omitempty" norman:"required,min=1"`
|
||||
TriggeredBy string `json:"triggeredBy,omitempty" norman:"required,options=user|cron|webhook"`
|
||||
@@ -198,8 +203,6 @@ type RepoPerm struct {
|
||||
}
|
||||
|
||||
type PipelineExecutionLogSpec struct {
|
||||
ProjectName string `json:"projectName" yaml:"projectName" norman:"required,type=reference[project]"`
|
||||
|
||||
PipelineExecutionName string `json:"pipelineExecutionName,omitempty" norman:"type=reference[pipelineExecution]"`
|
||||
Stage int `json:"stage,omitempty" norman:"min=1"`
|
||||
Step int `json:"step,omitempty" norman:"min=1"`
|
||||
|
@@ -4069,6 +4069,13 @@ func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec) {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
if in.Templates != nil {
|
||||
in, out := &in.Templates, &out.Templates
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user