-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api,ui,cdsctl): bulk apply request for workflow template #3831
Conversation
…or template bulk update
…selection in bulk modal
CDS Report build-ui#7930.0 ✘
|
…and select default instances in ctl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you forgot to git add the tests for the modified and new API handlers :)
ui/src/app/shared/workflow-template/apply-modal/workflow-template.apply-modal.component.ts
Outdated
Show resolved
Hide resolved
ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.component.ts
Outdated
Show resolved
Hide resolved
ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.html
Outdated
Show resolved
Hide resolved
ui/src/app/shared/workflow-template/bulk-modal/workflow-template.bulk-modal.html
Outdated
Show resolved
Hide resolved
ui/src/app/views/settings/workflow-template/edit/workflow-template.edit.component.ts
Outdated
Show resolved
Hide resolved
cli/cdsctl/template_bulk.go
Outdated
func templateInitOperationFromParams(mwtis map[string]sdk.WorkflowTemplateInstance, minstances map[string]templateBulkInstancePath, | ||
params, fileParams []templateBulkParameter) map[string]sdk.WorkflowTemplateBulkOperation { | ||
// for all given instances, create an operation and reuse request if instance already exists | ||
moperations := map[string]sdk.WorkflowTemplateBulkOperation{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indicate length of minstances
cli/cdsctl/template_bulk.go
Outdated
|
||
func templateAskForInstances(wt *sdk.WorkflowTemplate, mwtis map[string]sdk.WorkflowTemplateInstance, minstances map[string]templateBulkInstancePath, | ||
moperations map[string]sdk.WorkflowTemplateBulkOperation) error { | ||
opts := []cli.CustomMultiSelectOption{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use make with length of mwtis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
cli/cdsctl/template_bulk.go
Outdated
info = cli.Green("up to date") | ||
} | ||
// init map of projects and project repositories to prevent multiple api calls | ||
mprojects := map[string]*sdk.Project{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indicate length of mwtis
CDS Report it#7989.0 ✘
|
CDS Report it#7990.1 ■
|
engine/api/templates_test.go
Outdated
"github.com/ovh/cds/sdk/slug" | ||
) | ||
|
||
func initTemplateTestCase() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initTemplateTestCase
is unused (from deadcode
)
CDS Report it#8039.0 ✘
|
cli/display.go
Outdated
go func(d *Display) { | ||
for { | ||
time.Sleep(100 * time.Millisecond) | ||
if *d == "" || ctx.Err() != nil { | ||
continue | ||
} | ||
|
||
for i := 0; i < count-1; i++ { | ||
fmt.Printf(clear) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printf-style function with dynamic first argument and no further arguments should use print-style function instead (from megacheck
)
@ovh/cds