1
0
mirror of https://github.com/rancher/types.git synced 2025-07-13 05:14:01 +00:00

update pipeline types

Add RunPipelineInput to specify which branch to build
Add option for using global github config when enabling pipeline
This commit is contained in:
gitlawr 2018-03-01 11:20:59 +08:00
parent 8d7dbe2543
commit 5599e1a913
2 changed files with 9 additions and 1 deletions

View File

@ -207,7 +207,12 @@ type PipelineExecutionLogSpec struct {
Message string `json:"message,omitempty"`
}
type RunPipelineInput struct {
Branch string `json:"branch,omitempty"`
}
type AuthAppInput struct {
InheritGlobal bool `json:"inheritGlobal,omitempty"`
SourceCodeType string `json:"sourceCodeType,omitempty" norman:"type=string,required"`
RedirectURL string `json:"redirectUrl,omitempty" norman:"type=string"`
TLS bool `json:"tls,omitempty"`

View File

@ -393,6 +393,7 @@ func pipelineTypes(schema *types.Schemas) *types.Schemas {
AddMapperForType(&Version, v3.PipelineExecutionLog{}).
MustImport(&Version, v3.AuthAppInput{}).
MustImport(&Version, v3.AuthUserInput{}).
MustImport(&Version, v3.RunPipelineInput{}).
MustImportAndCustomize(&Version, v3.SourceCodeCredential{}, func(schema *types.Schema) {
schema.ResourceActions = map[string]types.Action{
"refreshrepos": {},
@ -417,7 +418,9 @@ func pipelineTypes(schema *types.Schemas) *types.Schemas {
schema.ResourceActions = map[string]types.Action{
"activate": {},
"deactivate": {},
"run": {},
"run": {
Input: "runPipelineInput",
},
}
}).
MustImportAndCustomize(&Version, v3.PipelineExecution{}, func(schema *types.Schema) {