Skip to content

Commit

Permalink
fix: subtask: templating issue when creating subtask in foreach loop (#…
Browse files Browse the repository at this point in the history
…66) (#67)

Fixes #66

Signed-off-by: Romain Beuque <romain.beuque@corp.ovh.com>
  • Loading branch information
rbeuque74 authored Jan 15, 2020
1 parent 8e08b07 commit 88ada50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugins/builtin/subtask/subtask.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type SubtaskContext struct {

func ctx(stepName string) interface{} {
return &SubtaskContext{
TaskID: fmt.Sprintf(`{{ if (index .step "%s" "output") }}{{ index .step "%s" "output" "id" }}{{ end }}`, stepName, stepName),
TaskID: fmt.Sprintf("{{ if (index .step `%s` ) }}{{ if (index .step `%s` `output`) }}{{ index .step `%s` `output` `id` }}{{ end }}{{ end }}", stepName, stepName, stepName),
RequesterUsername: "{{.task.requester_username}}",
}
}
Expand Down

0 comments on commit 88ada50

Please sign in to comment.