fix: bug fix (#2427)

This commit is contained in:
dbb_DingYongliang 2024-10-10 16:23:16 +08:00 committed by GitHub
parent 87deeac2af
commit b10dc00c1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -54,7 +54,7 @@ func ParseBool(ctx map[string]any, inputs []string) (bool, error) {
// ParseString parse template string to actual string
func ParseString(ctx map[string]any, input string) (string, error) {
if !IsTmplSyntax(input) {
return input, nil
return strings.Trim(input, "\r\n"), nil
}
tl, err := internal.Template.Parse(input)

View File

@ -132,6 +132,10 @@ func (e pipelineExecutor) execBatchHosts(ctx context.Context, play kkprojectv1.P
}
// generate task from role
for _, role := range play.Roles {
if !role.Taggable.IsEnabled(e.pipeline.Spec.Tags, e.pipeline.Spec.SkipTags) {
// if not match the tags. skip
continue
}
if err := e.variable.Merge(variable.MergeRuntimeVariable(role.Vars, serials...)); err != nil {
return fmt.Errorf("merge variable error: %w", err)
}